mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Added a request argument to render_to_string.
This is for consistency with Template.render. It adds a little bit of knowledge about HTTP requests in django.template.loader but I think consistency trumps purity.
This commit is contained in:
@@ -1351,8 +1351,10 @@ The following functions will no longer accept the ``dictionary`` and
|
||||
Use the ``context`` parameter instead. When ``dictionary`` is passed as a
|
||||
positional argument, which is the most common idiom, no changes are needed.
|
||||
|
||||
There is no replacement for ``context_instance``. All data must be passed to
|
||||
templates through the ``context`` dict.
|
||||
If you're passing a :class:`~django.template.Context` in ``context_instance``,
|
||||
pass a :class:`dict` in the ``context`` parameter instead. If you're passing a
|
||||
:class:`~django.template.RequestContext`, pass the request separately in the
|
||||
``request`` parameter.
|
||||
|
||||
``dirs`` argument of template-finding functions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user