Skip to content

Enable middleware decorator to work in newer versions of Django #16

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

Merged
merged 6 commits into from
Aug 22, 2020

Conversation

daneah
Copy link
Member

@daneah daneah commented Aug 22, 2020

Resolves #6

django-webmention provides both an old-style and a new-style middleware, but the provided decorator wrapped only the old-style middleware. By inheriting from django.utils.deprecation.MiddlewareMixin, the middleware and the decorator become compatible with both styles.

Leaving the standalone new-style middleware in for backward compatibility as well. Dropping support for Python 3.5 because Django 3.0+ no longer supports it.

Adding automation for releasing to GitHub releases and PyPI as I hadn't done that prior.

@daneah daneah added the bug label Aug 22, 2020
@daneah
Copy link
Member Author

daneah commented Aug 22, 2020

@philgyford have a look! Turned out to be similar to what we discussed.

@daneah daneah merged commit 94ccdae into master Aug 22, 2020
@daneah daneah deleted the new-style-middleware branch August 22, 2020 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

decorator does not work
1 participant