Refs #25978 -- Removed shortcuts.render_to_response() per deprecation timeline.

This commit is contained in:
Tim Graham 2018-12-27 19:23:09 -05:00
parent 944469939b
commit 573ec714e5
6 changed files with 3 additions and 113 deletions

View file

@ -1,44 +1,4 @@
from django.shortcuts import render, render_to_response
def render_to_response_view(request):
return render_to_response('shortcuts/render_test.html', {
'foo': 'FOO',
'bar': 'BAR',
})
def render_to_response_view_with_multiple_templates(request):
return render_to_response([
'shortcuts/no_such_template.html',
'shortcuts/render_test.html',
], {
'foo': 'FOO',
'bar': 'BAR',
})
def render_to_response_view_with_content_type(request):
return render_to_response('shortcuts/render_test.html', {
'foo': 'FOO',
'bar': 'BAR',
}, content_type='application/x-rendertest')
def render_to_response_view_with_status(request):
return render_to_response('shortcuts/render_test.html', {
'foo': 'FOO',
'bar': 'BAR',
}, status=403)
def render_to_response_view_with_using(request):
using = request.GET.get('using')
return render_to_response('shortcuts/using.html', using=using)
def context_processor(request):
return {'bar': 'context processor output'}
from django.shortcuts import render
def render_view(request):