Skip to content

Django 4.0 Compatibility #25

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
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Drop support for unsupported versions of Python/Django
  • Loading branch information
jamesvandyne committed Jan 1, 2023
commit 893b7308a5156ff062c18227bfc4c0d39c297a61
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ This package does not currently provide functionality for [sending webmentions](
* Add `'webmention'` to `INSTALLED_APPS`
* Run `python manage.py migrate webmention`
* Add the URL patterns to your top-level `urls.py`
* `path('webmention/', include('webmention.urls'))` for Django >= 2.0
* `url(r'^webmention', include('webmention.urls', namespace='webmention'))` for Django < 2.0
* `path('webmention/', include('webmention.urls'))` for Django >= 3.2

## Usage

* Include webmention information by either:
* Installing the middleware in `settings.py` (affects all views)
* Use `webmention.middleware.webmention_middleware` in `MIDDLEWARE` for Django >= 1.10
* Use `webmention.middleware.WebMentionMiddleware` in `MIDDLEWARE_CLASSES` for older projects
* Append `webmention.middleware.webmention_middleware` to your `MIDDLEWARE` settings
* Decorating a specific view with `webmention.middleware.include_webmention_information`
* View webmention responses in the Django admin interface and mark them as reviewed as needed

Expand Down
11 changes: 4 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Framework :: Django
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Framework :: Django :: 3.1
Framework :: Django :: 3.2
Framework :: Django :: 4.0
Framework :: Django :: 4.1
Expand Down Expand Up @@ -75,16 +72,16 @@ python_files =
addopts = -ra -q --cov=webmention

[tox:tox]
envlist = {py36,py37,py38,py39,py310,py311}-django{2.2,3.0,3.1,3.2,4.0,4.1}
envlist = {py37,py38,py39,py310,py311}-django{3.2,4.0,4.1}

[testenv]
extras = test
commands =
pytest {posargs}
deps =
django2.2: Django>=2.2,<2.3
django3.0: Django>=3.0,<3.1
django3.1: Django>=3.1,<3.2
django3.1: Django>=3.2,<3.3
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2

[testenv:lint]
extras = lint
Expand Down
6 changes: 1 addition & 5 deletions tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

import pytest

try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse

from django.urls import reverse
from django.http import HttpResponse

from webmention.middleware import WebMentionMiddleware
Expand Down