-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support new Django 1.10 middleware API #127
Comments
We're already working on this and I'm hoping to have it out early this week. |
Sorry for the delay! It's still coming. |
Thanks, there's no rush since Django 1.10 still supports the old API and many other middlewares haven't updated yet. I don't have a deep understanding of Django's error model. However, there's a couple complications I see in the new API:
|
I'm thinking we'll have to provide two middleware classes going forwards. Django provides a nice mixin to basically backport old middleware to the new style but you have to be on Django 1.10 to actually use it. |
Right, I've seen other projects adopt the mixin. I'm not sure it addresses the two issues I raised in my previous comment, though. As an alternative to having two middleware classes, you might be able to do one of the following with a little Python hackery:
|
That's basically what I was getting at. We'll probably do some kind of dynamic mixin. |
Is there a workaround for this in the meantime? We're currently blocked as we have some middleware requiring the new API. |
The workaround would be to keep the Rollbar middleware in I'm going to try to get to this near the end of this week or the beginning of next. |
@ezarowny from what I can tell Django ignores |
PR up at #138 |
0.13.7 has been released on PyPI. Let me know how that works for you guys. |
Yup! Testing #141 now. |
Django 1.10 introduced a new middleware API: https://docs.djangoproject.com/en/1.10/topics/http/middleware/
MIDDLEWARE_CLASSES
is deprecated in favor ofMIDDLEWARE
.Instructions for upgrading the middleware are at:
https://docs.djangoproject.com/en/1.10/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
The Travis CI configuration is already testing vs. Django 1.10. However, the Django example needs to be updated to use the new api.
The text was updated successfully, but these errors were encountered: