-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Django 1.10 functional middleware compatibility #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Submitted PR #879 using a more explicit check. |
I think this is already covered in this |
Thanks! @Benoss The check for middleware ordering is still there, and should be fixed if it fails now. I'll test it in a project of mine and merge if I don't hit any additional problems. |
That's the same issue as #874 by the way. Closing this issue as duplicate. |
Any chance we could have a new PyPi release to incorporate these changes? Thank you so much! |
debug_toolbar.apps.is_middlware_class()
is used in a check for middleware ordering issues.It assumes that all middleware in
MIDDLEWARE
are classes and doesn't account for Django 1.10's functional middleware.If a functional middleware factory is present, it fails when it hits
issubclass()
since the first argument isn't a class.I will try to submit a patch this weekend because I need to clone the project and get the test suite running but a simple solution would be tweak it:
Perhaps there is a more elegant check using the
types
module but I would need to read about Py2/3 compatibility.The text was updated successfully, but these errors were encountered: