I understand things have changed in Django 1.8 with how render_to_response takes arguments. I have lots of views and use this pattern everywhere:
...return render_to_response( template, context, context_instance=MyRequestContext(request))
MyRequestContext extends the RequestContext and adds some paramaters I always use in my templates.
Now this no longer works, and values in MyRequestContext is no longer accessible in the templates anymore.
So how should RequestContext be use now in Django 1.8? I need them + some context passed to all my templates.
/ J
-- EDIT --
Thanks for all the answers, as you point out this should work...
I ended up rewriting and replacing my previous subclassing of RequestContext --> MyRequestContext w. doing a separate ContextProcessors function and adding this into my OPTIONS:context_processors list and then using a normal RequestContext(request) in all of my views. Not sure what bug/problem I had in old solutions but this works now. Again - thanks for inspiration and responses.
context_instance
is only deprecated in 1.8, you can still userender_to_response
the way you are doing until you upgrade to Django 2.0. – Alasdair