mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Deprecated current_app in TemplateResponse and render(_to_response).
This commit is contained in:
@@ -2628,11 +2628,16 @@ a pattern for your new view.
|
||||
.. note::
|
||||
|
||||
Any view you render that uses the admin templates, or extends the base
|
||||
admin template, should provide the ``current_app`` argument to
|
||||
:class:`~django.template.RequestContext` or
|
||||
:class:`~django.template.Context` when rendering the template. It should
|
||||
be set to either ``self.name`` if your view is on an ``AdminSite`` or
|
||||
``self.admin_site.name`` if your view is on a ``ModelAdmin``.
|
||||
admin template, should set ``request.current_app`` before rendering the
|
||||
template. It should be set to either ``self.name`` if your view is on an
|
||||
``AdminSite`` or ``self.admin_site.name`` if your view is on a
|
||||
``ModelAdmin``.
|
||||
|
||||
.. versionchanged:: 1.8
|
||||
|
||||
In previous versions of Django, you had to provide the ``current_app``
|
||||
argument to :class:`~django.template.RequestContext` or
|
||||
:class:`~django.template.Context` when rendering the template.
|
||||
|
||||
.. _auth_password_reset:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user