我在views.py中使用了以下函数
def getdata(request):
with open('./studata.csv', 'r') as csvfile:
csv_file_reader = csv.DictReader(csvfile)
records = list(csv_file_reader)
count = len(records)
return render(request,'showdata.html',{'records':records})
这是csv文件-
Roll,Name,Stream
11,Bedanta Borah,Non-Medical,
1,Varsha Sharma,Non-Medical,
3,Nancy,Commerce,
4,Akshita,Humanities,
此数据应显示在 showdata.html 中。如何遍历 HTML 页面中的数据?
蓝山帝景
相关分类