Answers for "render_to_response() got an unexpected keyword argument 'context_to_response'"

Go
0

render_to_response() got an unexpected keyword argument 'context_to_response'

from django.shortcuts import render_to_response
from django.template import RequestContext

def my_view(request):
    context = {'foo': 'bar'}
    return render_to_response('my_template.html', context, context_instance=RequestContext(request))
Posted by: Guest on January-06-2021

Code answers related to "render_to_response() got an unexpected keyword argument 'context_to_response'"

Browse Popular Code Answers by Language