Removed current_app argument to render() and TemplateResponse().

Per deprecation timeline.
This commit is contained in:
Tim Graham 2015-09-03 15:52:04 -04:00
parent 75374d3797
commit 5e450c52aa
15 changed files with 19 additions and 175 deletions

View file

@ -15,7 +15,7 @@ introduce controlled coupling for convenience's sake.
``render``
==========
.. function:: render(request, template_name, context=None, context_instance=_context_instance_undefined, content_type=None, status=None, current_app=_current_app_undefined, dirs=_dirs_undefined, using=None)
.. function:: render(request, template_name, context=None, context_instance=_context_instance_undefined, content_type=None, status=None, dirs=_dirs_undefined, using=None)
Combines a given template with a given context dictionary and returns an
:class:`~django.http.HttpResponse` object with that rendered text.
@ -67,16 +67,6 @@ Optional arguments
``status``
The status code for the response. Defaults to ``200``.
``current_app``
A hint indicating which application contains the current view. See the
: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``.
``using``
The :setting:`NAME <TEMPLATES-NAME>` of a template engine to use for
loading the template.

View file

@ -680,13 +680,6 @@ the fully qualified name into parts and then tries the following lookup:
setting the current application on the :attr:`request.current_app
<django.http.HttpRequest.current_app>` attribute.
.. versionchanged:: 1.8
In previous versions of Django, you had to set the ``current_app``
attribute on any :class:`~django.template.Context` or
:class:`~django.template.RequestContext` that is used to render a
template.
.. versionchanged:: 1.9
Previously, the :ttag:`url` template tag did not use the namespace of the