mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #23789 -- TemplateResponse handles context differently from render
This commit is contained in:
parent
006451f894
commit
b748a8bc67
4 changed files with 28 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue