How to use the querylist object in Django template -
initially had code
(r'^list/fixed/$', list_detail.object_list, fixedlist)
in template use
{% val in object_list %}
it worked fine used generic list
but want write own view same
object_list = model.objects.all() return render_to_response('lists.html', object_list) but not working.
how can pass same object list template in generic view
render_to_response() takes dictionary of variables use.
return render_to_response('lists.html', {'object_list': object_list})
Comments
Post a Comment