summaryrefslogtreecommitdiff
path: root/django/shortcuts.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-12-27 19:23:09 -0500
committerTim Graham <timograham@gmail.com>2019-01-17 10:50:25 -0500
commit573ec714e5f52eccde01bbac3836d0edafcb2c20 (patch)
tree21c38c525773f24963afea76135715e5086147d5 /django/shortcuts.py
parent944469939b9eb93fda0924f78faba5c0ffae2dff (diff)
Refs #25978 -- Removed shortcuts.render_to_response() per deprecation timeline.
Diffstat (limited to 'django/shortcuts.py')
-rw-r--r--django/shortcuts.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/django/shortcuts.py b/django/shortcuts.py
index 7ab1df0e9d..eda6f8813c 100644
--- a/django/shortcuts.py
+++ b/django/shortcuts.py
@@ -3,31 +3,14 @@ This module collects helper functions and classes that "span" multiple levels
of MVC. In other words, these functions/classes introduce controlled coupling
for convenience's sake.
"""
-import warnings
-
from django.http import (
Http404, HttpResponse, HttpResponsePermanentRedirect, HttpResponseRedirect,
)
from django.template import loader
from django.urls import NoReverseMatch, reverse
-from django.utils.deprecation import RemovedInDjango30Warning
from django.utils.functional import Promise
-def render_to_response(template_name, context=None, content_type=None, status=None, using=None):
- """
- Return a HttpResponse whose content is filled with the result of calling
- django.template.loader.render_to_string() with the passed arguments.
- """
- warnings.warn(
- 'render_to_response() is deprecated in favor of render(). It has the '
- 'same signature except that it also requires a request.',
- RemovedInDjango30Warning, stacklevel=2,
- )
- content = loader.render_to_string(template_name, context, using=using)
- return HttpResponse(content, content_type, status)
-
-
def render(request, template_name, context=None, content_type=None, status=None, using=None):
"""
Return a HttpResponse whose content is filled with the result of calling