I am using Django 1.9.
With render_to_string I can easily pass the displayed html as json to my client script. However, since the template relies on variables like user , I also need to pass context_instance=RequestContext(request) , otherwise the template will not know what request.user , so if break, etc.
However, I get this failure warning:
RemovedInDjango110Warning: The context_instance render_to_string argument is deprecated. response_data ['content'] = render_to_string ("profile / userprofile_detail / content.html", context, context_instance = RequestContext (request))
What is an easy way to pass RequestContext to render_to_string ?
source share