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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user