Skip to content

Commit 170a947

Browse files
committed
Compatible Wagtail 6.0.1, Django 5.0.2
1 parent aa6cab8 commit 170a947

20 files changed

+56
-65
lines changed

example/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
'wagtail.search',
3838
'wagtail.contrib.redirects',
3939
'wagtail.sites',
40-
'wagtail.contrib.modeladmin',
40+
'wagtail_modeladmin',
4141
'wagtail.contrib.postgres_search',
4242
'wagtail.contrib.settings',
4343
'wagtail.contrib.search_promotions',

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.black]
22
line-length=99
3-
target-version=["py39"]
3+
target-version=["py310"]
44
exclude = '''
55
/(
66
\.git

readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
python:
3-
version: 3.5
3+
version: 3.10
44
pip_install: true
55
requirements_file: docs/requirements.txt

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The app itself
22
-e .
33

4-
Django>=3.2
4+
Django>=5
55
mock
66
psycopg2-binary
77

setup.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
install_requires = [
23-
"wagtail>=4.1,<5.3",
23+
"wagtail>5.2,<=6.0.1",
2424
"Unidecode>=0.04.14,<2.0",
2525
"wagtail-generic-chooser>=0.5.0,<0.7",
2626
]
@@ -61,17 +61,14 @@
6161
"License :: OSI Approved :: MIT License",
6262
"Operating System :: OS Independent",
6363
"Programming Language :: Python :: 3",
64-
"Programming Language :: Python :: 3.8",
65-
"Programming Language :: Python :: 3.9",
6664
"Programming Language :: Python :: 3.10",
65+
"Programming Language :: Python :: 3.11",
66+
"Programming Language :: Python :: 3.12",
6767
"Framework :: Django",
68-
"Framework :: Django :: 3.2",
69-
"Framework :: Django :: 4",
70-
"Framework :: Django :: 4.0",
71-
"Framework :: Django :: 4.1",
72-
"Framework :: Django :: 4.2",
68+
"Framework :: Django :: 5.0",
7369
"Framework :: Wagtail",
74-
"Framework :: Wagtail :: 4",
70+
"Framework :: Wagtail :: 5",
71+
"Framework :: Wagtail :: 6",
7572
"Topic :: Internet :: WWW/HTTP :: Site Management",
7673
],
7774
)

tests/blocks/test_form_block.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,48 +26,48 @@ def test_render(self):
2626
[
2727
"<h2>Basic Form</h2>",
2828
'<form action="." enctype="multipart/form-data" method="post" novalidate>',
29-
'<input type="hidden" name="hidden" id="id_hidden" />',
29+
'<input aria-describedby="id_hidden_helptext" type="hidden" name="hidden" id="id_hidden" />',
3030
'<input id="id_form_id" name="form_id" type="hidden" value="%s">' % self.form.pk,
3131
'<input id="id_form_reference" name="form_reference" type="hidden" value="some-ref">',
3232
'<div class="field-row">'
3333
'<label for="id_singleline">singleline</label>'
34-
'<input type="text" name="singleline" required id="id_singleline" />'
34+
'<input aria-describedby="id_singleline_helptext" type="text" name="singleline" required id="id_singleline" />'
3535
'<p class="help-text">Help</p>'
3636
"</div>",
3737
'<div class="field-row">'
3838
'<label for="id_multiline">multiline</label>'
39-
'<textarea name="multiline" cols="40" rows="10" required id="id_multiline">'
39+
'<textarea aria-describedby="id_multiline_helptext" name="multiline" cols="40" rows="10" required id="id_multiline">'
4040
"</textarea>"
4141
'<p class="help-text">Help</p>'
4242
"</div>"
4343
'<div class="field-row">'
4444
'<label for="id_date">date</label>'
45-
'<input type="text" name="date" value="" required id="id_date" />'
45+
'<input aria-describedby="id_date_helptext" type="text" name="date" value="" required id="id_date" />'
4646
'<p class="help-text">Help</p>'
4747
"</div>"
4848
'<div class="field-row">'
4949
'<label for="id_datetime">datetime</label>'
50-
'<input type="text" name="datetime" value="" required id="id_datetime" />'
50+
'<input aria-describedby="id_datetime_helptext" type="text" name="datetime" value="" required id="id_datetime" />'
5151
'<p class="help-text">Help</p>'
5252
"</div>"
5353
'<div class="field-row">'
5454
'<label for="id_email">email</label>'
55-
'<input type="email" maxlength="320" name="email" required id="id_email" />'
55+
'<input aria-describedby="id_email_helptext" type="email" maxlength="320" name="email" required id="id_email" />'
5656
'<p class="help-text">Help</p>'
5757
"</div>"
5858
'<div class="field-row">'
5959
'<label for="id_url">url</label>'
60-
'<input type="url" name="url" required id="id_url" />'
60+
'<input aria-describedby="id_url_helptext" type="url" name="url" required id="id_url" />'
6161
'<p class="help-text">Help</p>'
6262
"</div>"
6363
'<div class="field-row">'
6464
'<label for="id_number">number</label>'
65-
'<input type="number" name="number" step="any" required id="id_number" />'
65+
'<input aria-describedby="id_number_helptext" type="number" name="number" step="any" required id="id_number" />'
6666
'<p class="help-text">Help</p>'
6767
"</div>"
6868
'<div class="field-row">'
6969
'<label for="id_dropdown">dropdown</label>'
70-
'<select name="dropdown" id="id_dropdown">'
70+
'<select aria-describedby="id_dropdown_helptext" name="dropdown" id="id_dropdown">'
7171
'<option value="Option 1">Option 1</option>'
7272
'<option value="Option 2">Option 2</option>'
7373
'<option value="Option 3">Option 3</option></select>'
@@ -103,17 +103,17 @@ def test_render(self):
103103
"</div>"
104104
'<div class="field-row">'
105105
'<label for="id_checkbox">checkbox</label>'
106-
'<input type="checkbox" name="checkbox" required id="id_checkbox" />'
106+
'<input aria-describedby="id_checkbox_helptext" type="checkbox" name="checkbox" required id="id_checkbox" />'
107107
'<p class="help-text">Help</p>'
108108
"</div>"
109109
'<div class="field-row">'
110110
'<label for="id_singlefile">singlefile</label>'
111-
'<input type="file" name="singlefile" required id="id_singlefile" />'
111+
'<input aria-describedby="id_singlefile_helptext" type="file" name="singlefile" required id="id_singlefile" />'
112112
'<p class="help-text">Help</p>'
113113
"</div>"
114114
'<div class="field-row">'
115115
'<label for="id_multifile">multifile</label>'
116-
'<input type="file" name="multifile" multiple required id="id_multifile" />'
116+
'<input aria-describedby="id_multifile_helptext" type="file" name="multifile" multiple required id="id_multifile" />'
117117
'<p class="help-text">Help</p>'
118118
"</div>"
119119
'<input type="submit" value="Submit">'

tests/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"wagtail.contrib.redirects",
2626
"wagtail.contrib.forms",
2727
"wagtail.sites",
28-
"wagtail.contrib.modeladmin",
28+
"wagtail_modeladmin",
2929
"wagtail.contrib.settings",
3030
"taggit",
3131
"wagtailstreamforms",

tests/templatetags/test_form.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,48 @@ def test_render(self):
2424
[
2525
"<h2>Basic Form</h2>",
2626
'<form action="." enctype="multipart/form-data" method="post" novalidate>',
27-
'<input type="hidden" name="hidden" id="id_hidden" />',
27+
'<input aria-describedby="id_hidden_helptext" type="hidden" name="hidden" id="id_hidden" />',
2828
'<input id="id_form_id" name="form_id" type="hidden" value="%s">' % self.form.pk,
2929
'<input id="id_form_reference" name="form_reference" type="hidden" value="some-ref">',
3030
'<div class="field-row">'
3131
'<label for="id_singleline">singleline</label>'
32-
'<input type="text" name="singleline" required id="id_singleline" />'
32+
'<input aria-describedby="id_singleline_helptext" type="text" name="singleline" required id="id_singleline" />'
3333
'<p class="help-text">Help</p>'
3434
"</div>",
3535
'<div class="field-row">'
3636
'<label for="id_multiline">multiline</label>'
37-
'<textarea name="multiline" cols="40" rows="10" required id="id_multiline">'
37+
'<textarea aria-describedby="id_multiline_helptext" name="multiline" cols="40" rows="10" required id="id_multiline">'
3838
"</textarea>"
3939
'<p class="help-text">Help</p>'
4040
"</div>"
4141
'<div class="field-row">'
4242
'<label for="id_date">date</label>'
43-
'<input type="text" name="date" value="" required id="id_date" />'
43+
'<input aria-describedby="id_date_helptext" type="text" name="date" value="" required id="id_date" />'
4444
'<p class="help-text">Help</p>'
4545
"</div>"
4646
'<div class="field-row">'
4747
'<label for="id_datetime">datetime</label>'
48-
'<input type="text" name="datetime" value="" required id="id_datetime" />'
48+
'<input aria-describedby="id_datetime_helptext" type="text" name="datetime" value="" required id="id_datetime" />'
4949
'<p class="help-text">Help</p>'
5050
"</div>"
5151
'<div class="field-row">'
5252
'<label for="id_email">email</label>'
53-
'<input type="email" maxlength="320" name="email" required id="id_email" />'
53+
'<input aria-describedby="id_email_helptext" type="email" maxlength="320" name="email" required id="id_email" />'
5454
'<p class="help-text">Help</p>'
5555
"</div>"
5656
'<div class="field-row">'
5757
'<label for="id_url">url</label>'
58-
'<input type="url" name="url" required id="id_url" />'
58+
'<input aria-describedby="id_url_helptext" type="url" name="url" required id="id_url" />'
5959
'<p class="help-text">Help</p>'
6060
"</div>"
6161
'<div class="field-row">'
6262
'<label for="id_number">number</label>'
63-
'<input type="number" name="number" step="any" required id="id_number" />'
63+
'<input aria-describedby="id_number_helptext" type="number" name="number" step="any" required id="id_number" />'
6464
'<p class="help-text">Help</p>'
6565
"</div>"
6666
'<div class="field-row">'
6767
'<label for="id_dropdown">dropdown</label>'
68-
'<select name="dropdown" id="id_dropdown">'
68+
'<select aria-describedby="id_dropdown_helptext" name="dropdown" id="id_dropdown">'
6969
'<option value="Option 1">Option 1</option>'
7070
'<option value="Option 2">Option 2</option>'
7171
'<option value="Option 3">Option 3</option></select>'
@@ -101,17 +101,17 @@ def test_render(self):
101101
"</div>"
102102
'<div class="field-row">'
103103
'<label for="id_checkbox">checkbox</label>'
104-
'<input type="checkbox" name="checkbox" required id="id_checkbox" />'
104+
'<input aria-describedby="id_checkbox_helptext" type="checkbox" name="checkbox" required id="id_checkbox" />'
105105
'<p class="help-text">Help</p>'
106106
"</div>"
107107
'<div class="field-row">'
108108
'<label for="id_singlefile">singlefile</label>'
109-
'<input type="file" name="singlefile" required id="id_singlefile" />'
109+
'<input aria-describedby="id_singlefile_helptext" type="file" name="singlefile" required id="id_singlefile" />'
110110
'<p class="help-text">Help</p>'
111111
"</div>"
112112
'<div class="field-row">'
113113
'<label for="id_multifile">multifile</label>'
114-
'<input type="file" name="multifile" multiple required id="id_multifile" />'
114+
'<input aria-describedby="id_multifile_helptext" type="file" name="multifile" multiple required id="id_multifile" />'
115115
'<p class="help-text">Help</p>'
116116
"</div>"
117117
'<input type="submit" value="Submit">'

tests/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.contrib import admin
22
from django.urls import include, re_path
3-
from wagtail.admin import urls as wagtailadmin_urls
43
from wagtail import urls as wagtail_urls
4+
from wagtail.admin import urls as wagtailadmin_urls
55

66
urlpatterns = [
77
re_path(r"^admin/", admin.site.urls),

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
[tox]
22
envlist =
33
flake8
4-
py{311,312}-dj{41}-wt{41,50,51,52}
4+
py{310,311,312}-dj{50}-wt{50,51,52,60}
55

66
[gh-actions]
77
python =
8+
"3.10": py310
89
"3.11": py311
910
"3.12": py312
1011

1112
[testenv]
1213
deps =
1314
coverage
1415
mock
15-
dj41: Django>=4.1,<4.2
16-
wt41: wagtail>=4.1,<4.2
16+
dj50: Django>=5.0,<5.1
1717
wt50: wagtail>=5.0,<5.1
1818
wt51: wagtail>=5.1,<5.2
1919
wt52: wagtail>=5.2,<5.3
20+
wt60: wagtail>=6.0,<6.1
2021

2122
commands =
2223
coverage run manage.py test
2324

2425
basepython =
26+
py310: python3.10
2527
py311: python3.11
2628
py312: python3.12
2729

0 commit comments

Comments
 (0)