How can i pass QuerySet object in to template. And then Iterate through it in tempalte. If ican do it....?
Example
queryset =MyModel.objects.all()
return render_to_response('template.html',{'queryset':queryset})
How it'll looks in template?
Can I show field of foreigne key object in this template?
{% for each_model in model %}
#Do Something with model
{{each_model.name}}
{% endfor %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With