Is there a way to always include csrfContext = RequestContext(request) when I return a render_to_response from a view? I notice that many of my views display different content depending if a user is logged in or not. I thought it would be helpful if I included it in every view so I wouldn’t have to always add it in. Or, can you give me a reason why this is a bad design choice?
Is there a way to always include csrfContext = RequestContext(request) when I return a
Share
You need to include the
context_instance, this snippet of code is taken from the djandgo documentation.Notice the
context_instance=RequestContext(request), you need this being returned with your response.