From 7b6e42089c9d5ff2dcbfee4005f72cd42728222e Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 11 Feb 2017 05:49:04 -0500 Subject: Fixed #25978 -- Deprecated shorcuts.render_to_response(). --- docs/internals/deprecation.txt | 2 ++ docs/releases/2.0.txt | 4 ++++ docs/topics/http/shortcuts.txt | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index d6123b6b53..56aa7adacf 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -17,6 +17,8 @@ details on these changes. * The ``django.db.backends.postgresql_psycopg2`` module will be removed. +* ``django.shortcuts.render_to_response()`` will be removed. + .. _deprecation-removed-in-2.1: 2.1 diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index 818a8ada87..c4f65ec9ac 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -297,6 +297,10 @@ Miscellaneous ``'django.db.backends.postgresql_psycopg2'``, though you can simplify that by using the ``'django.db.backends.postgresql'`` name added in Django 1.9. +* ``django.shortcuts.render_to_response()`` is deprecated in favor of + :func:`django.shortcuts.render`. ``render()`` takes the same arguments + except that is also requires a ``request``. + .. _removed-features-2.0: Features removed in 2.0 diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index 705de11b69..51a39c88a1 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -86,9 +86,11 @@ This example is equivalent to:: .. function:: render_to_response(template_name, context=None, content_type=None, status=None, using=None) + .. deprecated:: 2.0 + This function preceded the introduction of :func:`render` and works similarly except that it doesn't make the ``request`` available in the - response. It's not recommended and is likely to be deprecated in the future. + response. ``redirect()`` ============== -- cgit v1.3