Opened 13 years ago
Closed 13 years ago
#18032 closed Uncategorized (invalid)
Inaccuracy of the documentation
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
from django.template.response import TemplateResponse def blog_index(request): return TemplateResponse(request, 'entry_list.html', {'entries': Entry.objects.all()})
Must:
from django.template.response import TemplateResponse def blog_index(request): return TemplateResponse(request, 'entry_list.html', {'entries': Entry.objects.all()}).render()
Note:
See TracTickets
for help on using tickets.
The example is correct. 'render' method is called internally by django at later stages. See https://docs.djangoproject.com/en/dev/ref/template-response/#the-rendering-process