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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user