Deprecated current_app in TemplateResponse and render(_to_response).

This commit is contained in:
Aymeric Augustin 2014-12-14 17:48:51 +01:00
parent e53495ba33
commit cf1f36bb6e
18 changed files with 197 additions and 56 deletions

View file

@ -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:

View file

@ -182,6 +182,11 @@ Methods
:ref:`namespaced URL resolution strategy <topics-http-reversing-url-namespaces>`
for more information.
.. deprecated:: 1.8
The ``current_app`` argument is deprecated. Instead you should set
``request.current_app``.
``charset``
The charset in which the response will be encoded. If not given it will
be extracted from ``content_type``, and if that is unsuccessful, the