Answers for "access django object in html"

0

access django object in html

{% for x in data %}
   <h3>{{x.name}}</h3>
   <h4>{{x.department}}</h4>
 {% endfor %}
Posted by: Guest on July-29-2020
0

access django object in html

data = model1.objects.all()
     return TemplateResponse(request, 'index.html', {'data': data})
Posted by: Guest on July-29-2020

Code answers related to "access django object in html"

Browse Popular Code Answers by Language