diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-12-14 17:48:51 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-12-28 17:02:29 +0100 |
| commit | cf1f36bb6eb34fafe6c224003ad585a647f6117b (patch) | |
| tree | 7e3714ca48a6456ba5d3ebed2fc873f9ff0e6dc6 /docs/ref | |
| parent | e53495ba3352c2c0fdb6178f2b333c30cb6b5d46 (diff) | |
Deprecated current_app in TemplateResponse and render(_to_response).
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 15 | ||||
| -rw-r--r-- | docs/ref/template-response.txt | 5 |
2 files changed, 15 insertions, 5 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index a1d4c3a563..a6a315cc88 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -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: diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index bfee0e29af..3f7572b557 100644 --- a/docs/ref/template-response.txt +++ b/docs/ref/template-response.txt @@ -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 |
