[Answer]-Issue with views that call context.update(csrf(request))

1👍

You’re using the wrong parameter to render_to_response. It should be context_instance=RequestContext(request).

Since you weren’t really using a RequestContext, none of the context processors would work. Once you replace it, there’ll no longer be any need to add the CSRF token manually.

content_type is something else entirely – the MIME type of the response. Since it’s not expecting a RequestContext instance, it’s a bit surprising this does not raise an error.

Leave a comment