Re: Upgrading from Django 1.7: render_to_response and context_instance

2018-08-09 Thread Hanne Moa
This is only used in one app, and one views.py out of 38. There's only this one views.py remaining that uses render_to_response with context_instance. If this was modern Django code written by me I would have used class-based views and a mixin modifying get_context_data (Thank $deity for CBVs).

RE: Upgrading from Django 1.7: render_to_response and context_instance

2018-08-08 Thread Matthew Pava
If you are simply adding something to most every request, I would add a context processor in the TEMPLATE settings. Check out https://docs.djangoproject.com/en/2.1/topics/templates/#context-processors In this example, I have an app called general. Within that is a py file called