django-developer-panel
django-developer-panel copied to clipboard
Cache compatibility fix
Check to make sure response has a context_data attribute before trying to access it. This should improve compatibility with various other middleware, such as caches, that may not always pass a response on with a context_data attribute. There should be no bad side-effects.
Originally reported over on the Wagtail-Cache repo here: https://github.com/coderedcorp/wagtail-cache/issues/5
This PR makes the two packages work nicely together.