1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #25969 -- Replaced usage of render_to_response() with render() in tests.

This commit is contained in:
Tim Graham
2015-12-22 13:50:16 -05:00
parent 312fc1af7b
commit edf3b88f1a
4 changed files with 19 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ from django.http import (
HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed,
HttpResponseNotFound, HttpResponseRedirect,
)
from django.shortcuts import render_to_response
from django.shortcuts import render
from django.template import Context, Template
from django.test import Client
from django.utils.decorators import method_decorator
@@ -168,12 +168,10 @@ def form_view_with_template(request):
else:
form = TestForm()
message = 'GET form page'
return render_to_response('form_view.html',
{
'form': form,
'message': message
}
)
return render(request, 'form_view.html', {
'form': form,
'message': message,
})
class BaseTestFormSet(BaseFormSet):