Skip to content

Commit 4ab78fe

Browse files
authored
Merge branch 'labd:master' into wrds_forms_work
2 parents 940e4ff + ae88424 commit 4ab78fe

26 files changed

+479
-262
lines changed

.github/workflows/python-test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ jobs:
2727
- py37-dj32-wt216
2828
- py38-dj32-wt215
2929
- py38-dj32-wt216
30+
- py38-dj40-wt216
3031
- py39-dj32-wt215
3132
- py39-dj32-wt216
33+
- py39-dj40-wt216
3234
- py310-dj32-wt215
33-
- py310-dj32-wt216
35+
- py310-dj32-wt216
36+
- py310-dj40-wt216
3437
include:
3538
- python-version: 3.7
3639
tox_env: py37-dj32-wt215
@@ -40,14 +43,20 @@ jobs:
4043
tox_env: py38-dj32-wt215
4144
- python-version: 3.8
4245
tox_env: py38-dj32-wt216
46+
- python-version: 3.8
47+
tox_env: py38-dj40-wt216
4348
- python-version: 3.9
4449
tox_env: py39-dj32-wt215
4550
- python-version: 3.9
4651
tox_env: py39-dj32-wt216
52+
- python-version: 3.9
53+
tox_env: py39-dj40-wt216
4754
- python-version: "3.10"
4855
tox_env: py310-dj32-wt215
4956
- python-version: "3.10"
5057
tox_env: py310-dj32-wt216
58+
- python-version: "3.10"
59+
tox_env: py310-dj40-wt216
5160
steps:
5261
- uses: actions/checkout@v2
5362
- name: Set up Python ${{ matrix.python-version }}

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Changelog
33
*********
44

5+
3.19.0
6+
------
7+
* Django 4.0 support
8+
59
3.18.1
610
------
711
* Dropped Django 2.X 3.0 and 3.1 support

example/urls.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.conf import settings
22
from django.conf.urls.static import static
3-
from django.conf.urls import include, url
3+
from django.urls import include, re_path
44
from django.contrib import admin
55

66
from wagtail.admin import urls as wagtailadmin_urls
@@ -9,14 +9,14 @@
99

1010

1111
urlpatterns = [
12-
url(r'^admin/', admin.site.urls),
13-
url(r'^cms/', include(wagtailadmin_urls)),
14-
url(r'^documents/', include(wagtaildocs_urls)),
12+
re_path(r'^admin/', admin.site.urls),
13+
re_path(r'^cms/', include(wagtailadmin_urls)),
14+
re_path(r'^documents/', include(wagtaildocs_urls)),
1515
]
1616

1717
if settings.DEBUG: # pragma: no cover
1818
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
1919

2020
urlpatterns += [
21-
url(r'', include(wagtail_urls)),
21+
re_path(r'', include(wagtail_urls)),
2222
]

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@
6060
"Framework :: Wagtail",
6161
"Framework :: Wagtail :: 2",
6262
"Programming Language :: Python :: 3",
63-
"Programming Language :: Python :: 3.6",
6463
"Programming Language :: Python :: 3.7",
6564
"Programming Language :: Python :: 3.8",
65+
"Programming Language :: Python :: 3.9",
66+
"Programming Language :: Python :: 3.10",
6667
"Framework :: Django",
67-
"Framework :: Django :: 2.0",
68-
"Framework :: Django :: 3.0",
68+
"Framework :: Django :: 2.2",
69+
"Framework :: Django :: 3.2",
70+
"Framework :: Django :: 4",
6971
"Framework :: Wagtail",
7072
"Framework :: Wagtail :: 2",
7173
"Topic :: Internet :: WWW/HTTP :: Site Management",

tests/blocks/test_form_block.py

Lines changed: 202 additions & 99 deletions
Large diffs are not rendered by default.

tests/models/test_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.core.exceptions import ValidationError
22
from django.db import models
33
from django.test import override_settings
4-
from django.utils.translation import ugettext_lazy as _
4+
from django.utils.translation import gettext_lazy as _
55
from wagtail.core.models import Page
66

77
from wagtailstreamforms.conf import get_setting

tests/settings.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,14 @@
4343
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
4444
]
4545

46-
WAGTAIL_VERSION = re.search("wt[0-9]*", os.environ.get("TOX_ENV_NAME", "wt211"))[0]
46+
DJANGO_VERSION = int(
47+
re.search("dj([0-9]+)", os.environ.get("TOX_ENV_NAME", "dj40")).group(1)
48+
)
49+
WAGTAIL_VERSION = int(
50+
re.search("wt([0-9]+)", os.environ.get("TOX_ENV_NAME", "wt216")).group(1)
51+
)
4752

48-
PRE_WAGTAIL_211_VERSIONS = [
49-
"wt23",
50-
"wt24",
51-
"wt25",
52-
"wt26",
53-
"wt27",
54-
"wt28",
55-
"wt29",
56-
"wt210",
57-
]
58-
59-
PRE_WAGTAIL_211 = False
60-
61-
if WAGTAIL_VERSION in PRE_WAGTAIL_211_VERSIONS:
62-
MIDDLEWARE.append("wagtail.core.middleware.SiteMiddleware")
63-
PRE_WAGTAIL_211 = True
53+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
6454

6555
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": "testdb"}}
6656

0 commit comments

Comments
 (0)