Pass QuerySet object in template. Django
How can i pass QuerySet object in to template. And then Iterate through it in tempalte. If ican do it....?
Example
queryset =MyModel开发者_C百科.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 %}
精彩评论