To reference "pers" in your template as stated, your dictionary should be
{"pers": pers}
return render_to_response('index.html', {"pers": pers})
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receivin
You need to pass a dictionary as a second parameter to
the render_to_response method with the variables that you wish to access in
the template.
for example:
return render_to_response('index.html', {"people_info": pers})
that way you can access the variable "people_info" in the template.
On Th
Hi ,
I have below lines in view.py and acesssing this variable in html but not
getting output,
def index (request):
pers = list(PersonInfo.objects.filter())
return render_to_response('index.html')
html code
{% for id in p
3 matches
Mail list logo