1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #23789 -- TemplateResponse handles context differently from render

This commit is contained in:
Luke Plant
2014-11-10 14:43:40 +00:00
parent 006451f894
commit b748a8bc67
4 changed files with 28 additions and 4 deletions

View File

@@ -287,9 +287,10 @@ invoked immediately.
Using TemplateResponse and SimpleTemplateResponse
=================================================
A TemplateResponse object can be used anywhere that a normal
HttpResponse can be used. It can also be used as an alternative to
calling :func:`~django.shortcuts.render_to_response()`.
A TemplateResponse object can be used anywhere that a normal HttpResponse can be
used. It can also be used as an alternative to calling
:func:`~django.shortcuts.render()` or
:func:`~django.shortcuts.render_to_response()`.
For example, the following simple view returns a
:class:`TemplateResponse()` with a simple template, and a context