Middleware compatibility with Django 1.10
See original GitHub issueSince Django 1.10 introduced new middleware style, existing middlewares should be updated. For now I can suggest possible workaround for impatient Django 1.10 users:
from django.utils.deprecation import MiddlewareMixin
from debug_toolbar.middleware import DebugToolbarMiddleware
class AtopdedTo110DebugMiddleware(MiddlewareMixin, DebugToolbarMiddleware):
pass
And then add it to your MIDDLEWARE settings:
MIDDLEWARE += ['my.middleware.AtopdedTo110DebugMiddleware']
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Middleware - Django documentation
Middleware is a framework of hooks into Django's request/response processing. It's a light, low-level “plugin” system for globally altering Django's input or ...
Read more >Django 1.10 and Middleware - Stack Overflow
I need Django Debug Toolbar. Release 1.5 is compatible with Django 1.10. This is installation documentation: https://django-debug-toolbar.
Read more >Compatible Django Middleware - kichik's blog
Django 1.10 added a new style of middleware with a different interface and a new setting called MIDDLWARE instead of MIDDLEWARE_CLASSES .
Read more >django-cors-headers - PyPI
Basically all of the changes in the forked django-cors-middleware were merged back, ... which still works as an alias, with the new name...
Read more >Fix middleware for Django>1.10. (!9) - GNU Mailman - GitLab
Fixes the middleware in a backward compatible way.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

any chance you can push a new release with this fix?
@valentjedi - thank you for the workaround!
Related: the documentation should also be updated: https://django-debug-toolbar.readthedocs.io/en/stable/installation.html#middleware