django-developer-panel icon indicating copy to clipboard operation
django-developer-panel copied to clipboard

Cache compatibility fix

Open drcongo opened this issue 5 years ago • 0 comments

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.

drcongo avatar Dec 19 '19 20:12 drcongo