Made template response APIs enforce the use of dict and backend-specific template objects.

Per deprecation timeline; refs 79deb6a071.
This commit is contained in:
Tim Graham 2015-09-05 12:06:34 -04:00
parent e6cfa08f2d
commit 9af3c6b9ce
3 changed files with 4 additions and 110 deletions

View file

@ -38,10 +38,6 @@ Attributes
Example: ``['foo.html', 'path/to/bar.html']``
.. deprecated:: 1.8
``template_name`` used to accept a :class:`~django.template.Template`.
.. attribute:: SimpleTemplateResponse.context_data
The context data to be used when rendering the template. It must be a
@ -49,10 +45,6 @@ Attributes
Example: ``{'foo': 123}``
.. deprecated:: 1.8
``context_data`` used to accept a :class:`~django.template.Context`.
.. attribute:: SimpleTemplateResponse.rendered_content
The current rendered value of the response content, using the current
@ -76,18 +68,10 @@ Methods
:func:`~django.template.loader.get_template()`), the name of a template,
or a list of template names.
.. deprecated:: 1.8
``template`` used to accept a :class:`~django.template.Template`.
``context``
A :class:`dict` of values to add to the template context. By default,
this is an empty dictionary.
.. deprecated:: 1.8
``context`` used to accept a :class:`~django.template.Context`.
``content_type``
The value included in the HTTP ``Content-Type`` header, including the
MIME type specification and the character set encoding. If
@ -118,16 +102,6 @@ Methods
Override this method in order to customize the context.
.. versionchanged:: 1.8
``resolve_context`` returns a :class:`dict`. It used to return a
:class:`~django.template.Context`.
.. deprecated:: 1.8
``resolve_context`` no longer accepts a
:class:`~django.template.Context`.
.. method:: SimpleTemplateResponse.resolve_template(template)
Resolves the template instance to use for rendering. Accepts a
@ -139,16 +113,6 @@ Methods
Override this method in order to customize template loading.
.. versionchanged:: 1.8
``resolve_template`` returns backend-dependent template object. It
used to return a :class:`~django.template.Template`.
.. deprecated:: 1.8
``resolve_template`` no longer accepts a
:class:`~django.template.Template`.
.. method:: SimpleTemplateResponse.add_post_render_callback()
Add a callback that will be invoked after rendering has taken
@ -203,18 +167,10 @@ Methods
:func:`~django.template.loader.get_template()`), the name of a template,
or a list of template names.
.. deprecated:: 1.8
``template`` used to accept a :class:`~django.template.Template`.
``context``
A :class:`dict` of values to add to the template context. By default,
this is an empty dictionary.
.. deprecated:: 1.8
``context`` used to accept a :class:`~django.template.Context`.
``content_type``
The value included in the HTTP ``Content-Type`` header, including the
MIME type specification and the character set encoding. If