amanda
0
Q:

access django object in html

 {% for x in data %}
   <h3>{{x.name}}</h3>
   <h4>{{x.department}}</h4>
 {% endfor %}
0
     data = model1.objects.all()
     return TemplateResponse(request, 'index.html', {'data': data})
0

New to Communities?

Join the community