wagtail 6.3.4__py3-none-any.whl → 6.3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wagtail/__init__.py +1 -1
- wagtail/blocks/list_block.py +1 -0
- wagtail/contrib/forms/tests/test_views.py +28 -4
- wagtail/contrib/forms/views.py +1 -1
- wagtail/migrations/0047_add_workflow_models.py +0 -0
- wagtail/test/settings.py +6 -2
- wagtail/tests/test_streamfield.py +48 -0
- {wagtail-6.3.4.dist-info → wagtail-6.3.5.dist-info}/METADATA +2 -2
- {wagtail-6.3.4.dist-info → wagtail-6.3.5.dist-info}/RECORD +12 -12
- {wagtail-6.3.4.dist-info → wagtail-6.3.5.dist-info}/WHEEL +1 -1
- {wagtail-6.3.4.dist-info → wagtail-6.3.5.dist-info}/entry_points.txt +0 -0
- {wagtail-6.3.4.dist-info → wagtail-6.3.5.dist-info}/licenses/LICENSE +0 -0
- {wagtail-6.3.4.dist-info → wagtail-6.3.5.dist-info}/top_level.txt +0 -0
wagtail/__init__.py
CHANGED
|
@@ -6,7 +6,7 @@ from wagtail.utils.version import get_semver_version, get_version
|
|
|
6
6
|
|
|
7
7
|
# major.minor.patch.release.number
|
|
8
8
|
# release must be one of alpha, beta, rc, or final
|
|
9
|
-
VERSION = (6, 3,
|
|
9
|
+
VERSION = (6, 3, 5, "final", 1)
|
|
10
10
|
|
|
11
11
|
__version__ = get_version(VERSION)
|
|
12
12
|
|
wagtail/blocks/list_block.py
CHANGED
|
@@ -426,6 +426,7 @@ class ListBlock(Block):
|
|
|
426
426
|
child_block = kwargs.get("child_block")
|
|
427
427
|
if isinstance(child_block, Block):
|
|
428
428
|
block_id = lookup.add_block(child_block)
|
|
429
|
+
kwargs = kwargs.copy() # avoid mutating the original kwargs stored in self._constructor_args
|
|
429
430
|
kwargs["child_block"] = block_id
|
|
430
431
|
|
|
431
432
|
return path, args, kwargs
|
|
@@ -552,15 +552,39 @@ class TestFormsSubmissionsList(WagtailTestUtils, TestCase):
|
|
|
552
552
|
self.assertEqual(len(response.context["data_rows"]), 1)
|
|
553
553
|
|
|
554
554
|
def test_list_submissions_filtering_range(self):
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
)
|
|
555
|
+
url = reverse("wagtailforms:list_submissions", args=(self.form_page.id,))
|
|
556
|
+
params = {"date_from": "12/31/2013", "date_to": "01/02/2014"}
|
|
557
|
+
response = self.client.get(url, params)
|
|
559
558
|
|
|
560
559
|
# Check response
|
|
561
560
|
self.assertEqual(response.status_code, 200)
|
|
562
561
|
self.assertTemplateUsed(response, "wagtailforms/submissions_index.html")
|
|
563
562
|
self.assertEqual(len(response.context["data_rows"]), 1)
|
|
563
|
+
soup = self.get_soup(response.content)
|
|
564
|
+
next_input = soup.select_one('input[name="next"]')
|
|
565
|
+
self.assertIsNotNone(next_input)
|
|
566
|
+
self.assertEqual(next_input["value"], f"{url}?{urlencode(params)}")
|
|
567
|
+
|
|
568
|
+
def test_list_submissions_filtering_results(self):
|
|
569
|
+
index_url = reverse("wagtailforms:list_submissions", args=(self.form_page.id,))
|
|
570
|
+
results_url = reverse(
|
|
571
|
+
"wagtailforms:list_submissions_results",
|
|
572
|
+
args=(self.form_page.id,),
|
|
573
|
+
)
|
|
574
|
+
params = {"date_from": "12/31/2013", "date_to": "01/02/2014"}
|
|
575
|
+
response = self.client.get(results_url, params)
|
|
576
|
+
|
|
577
|
+
# Check response
|
|
578
|
+
self.assertEqual(response.status_code, 200)
|
|
579
|
+
self.assertTemplateNotUsed(response, "wagtailforms/submissions_index.html")
|
|
580
|
+
self.assertTemplateUsed(response, "wagtailforms/list_submissions.html")
|
|
581
|
+
self.assertEqual(len(response.context["data_rows"]), 1)
|
|
582
|
+
soup = self.get_soup(response.content)
|
|
583
|
+
next_input = soup.select_one('input[name="next"]')
|
|
584
|
+
self.assertIsNotNone(next_input)
|
|
585
|
+
# The next URL should point to the index page (instead of results page)
|
|
586
|
+
# with the same query params to preserve the filter
|
|
587
|
+
self.assertEqual(next_input["value"], f"{index_url}?{urlencode(params)}")
|
|
564
588
|
|
|
565
589
|
def test_list_submissions_pagination(self):
|
|
566
590
|
self.make_list_submissions()
|
wagtail/contrib/forms/views.py
CHANGED
|
File without changes
|
wagtail/test/settings.py
CHANGED
|
@@ -49,8 +49,12 @@ if DATABASES["default"]["ENGINE"] == "sql_server.pyodbc":
|
|
|
49
49
|
|
|
50
50
|
# explicitly set charset / collation to utf8 on mysql
|
|
51
51
|
if DATABASES["default"]["ENGINE"] == "django.db.backends.mysql":
|
|
52
|
-
DATABASES["default"]["
|
|
53
|
-
|
|
52
|
+
DATABASES["default"]["OPTIONS"] = {
|
|
53
|
+
"charset": "utf8mb4",
|
|
54
|
+
"collation": "utf8mb4_general_ci",
|
|
55
|
+
}
|
|
56
|
+
DATABASES["default"]["TEST"]["CHARSET"] = "utf8mb4"
|
|
57
|
+
DATABASES["default"]["TEST"]["COLLATION"] = "utf8mb4_general_ci"
|
|
54
58
|
|
|
55
59
|
|
|
56
60
|
SECRET_KEY = "not needed"
|
|
@@ -967,6 +967,54 @@ class TestDeconstructStreamFieldWithLookup(TestCase):
|
|
|
967
967
|
},
|
|
968
968
|
)
|
|
969
969
|
|
|
970
|
+
def test_deconstruct_with_listblock_with_child_block_kwarg_idempotence(self):
|
|
971
|
+
# See https://github.com/wagtail/wagtail/issues/13137. When a ListBlock is defined with
|
|
972
|
+
# a child_block keyword argument, its deconstruct_with_lookup method inserts that child
|
|
973
|
+
# block into the lookup to obtain an ID, and returns that ID as the child_block kwarg
|
|
974
|
+
# in its result. However, an implementation bug meant that this was mutating the kwargs
|
|
975
|
+
# dict stored in the block's _constructor_args attribute. As a result, subsequent calls
|
|
976
|
+
# to deconstruct_with_lookup (which happen routinely during makemigrations) would
|
|
977
|
+
# encounter the ID in child_block, leave it alone (because it isn't a block object as
|
|
978
|
+
# expected), and return that ID in the result without adding it to the lookup, messing
|
|
979
|
+
# up the ID sequence in the process.
|
|
980
|
+
field = StreamField(
|
|
981
|
+
[
|
|
982
|
+
("heading", blocks.CharBlock(required=True)),
|
|
983
|
+
(
|
|
984
|
+
"bullets",
|
|
985
|
+
blocks.ListBlock(child_block=blocks.CharBlock(required=False)),
|
|
986
|
+
),
|
|
987
|
+
],
|
|
988
|
+
blank=True,
|
|
989
|
+
)
|
|
990
|
+
field.set_attributes_from_name("body")
|
|
991
|
+
|
|
992
|
+
expected_args = [
|
|
993
|
+
[
|
|
994
|
+
("heading", 0),
|
|
995
|
+
("bullets", 2),
|
|
996
|
+
]
|
|
997
|
+
]
|
|
998
|
+
expected_kwargs = {
|
|
999
|
+
"blank": True,
|
|
1000
|
+
"block_lookup": {
|
|
1001
|
+
0: ("wagtail.blocks.CharBlock", (), {"required": True}),
|
|
1002
|
+
1: ("wagtail.blocks.CharBlock", (), {"required": False}),
|
|
1003
|
+
2: ("wagtail.blocks.ListBlock", (), {"child_block": 1}),
|
|
1004
|
+
},
|
|
1005
|
+
}
|
|
1006
|
+
name, path, args, kwargs = field.deconstruct()
|
|
1007
|
+
self.assertEqual(name, "body")
|
|
1008
|
+
self.assertEqual(path, "wagtail.fields.StreamField")
|
|
1009
|
+
self.assertEqual(kwargs, expected_kwargs)
|
|
1010
|
+
self.assertEqual(args, expected_args)
|
|
1011
|
+
|
|
1012
|
+
name, path, args, kwargs = field.deconstruct()
|
|
1013
|
+
self.assertEqual(name, "body")
|
|
1014
|
+
self.assertEqual(path, "wagtail.fields.StreamField")
|
|
1015
|
+
self.assertEqual(kwargs, expected_kwargs)
|
|
1016
|
+
self.assertEqual(args, expected_args)
|
|
1017
|
+
|
|
970
1018
|
def test_deconstruct_with_listblock_subclass(self):
|
|
971
1019
|
# See https://github.com/wagtail/wagtail/issues/12164 - unlike StructBlock and StreamBlock,
|
|
972
1020
|
# ListBlock's deconstruct method doesn't reduce subclasses to the base ListBlock class.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wagtail
|
|
3
|
-
Version: 6.3.
|
|
3
|
+
Version: 6.3.5
|
|
4
4
|
Summary: A Django content management system.
|
|
5
5
|
Home-page: https://wagtail.org/
|
|
6
6
|
Author: Wagtail core team + contributors
|
|
@@ -40,7 +40,7 @@ Requires-Dist: django-filter>=23.3
|
|
|
40
40
|
Requires-Dist: draftjs_exporter<6.0,>=2.1.5
|
|
41
41
|
Requires-Dist: Pillow<12.0.0,>=9.1.0
|
|
42
42
|
Requires-Dist: beautifulsoup4<4.13,>=4.8
|
|
43
|
-
Requires-Dist: Willow[heif]<2,>=1.
|
|
43
|
+
Requires-Dist: Willow[heif]<2,>=1.10.0
|
|
44
44
|
Requires-Dist: requests<3.0,>=2.11.1
|
|
45
45
|
Requires-Dist: l18n>=2018.5
|
|
46
46
|
Requires-Dist: openpyxl<4.0,>=3.0.10
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
wagtail/__init__.py,sha256=
|
|
1
|
+
wagtail/__init__.py,sha256=IxxJ8QzgHcMVGHTR7mCmSlH5JF45wP-EMKbGOWjOEn0,724
|
|
2
2
|
wagtail/apps.py,sha256=38kXTdHoQzFnpUqDNxFpsqn2dut4V0u9rLOkhqCoYkc,713
|
|
3
3
|
wagtail/compat.py,sha256=L41FhlX4xy5KgTdJ63smtM78mtKf1mxkPeOs8kyOwS0,538
|
|
4
4
|
wagtail/coreutils.py,sha256=8wQC7LCRJ3dCILhpAsODCDCxlU0x--6UXDVX4Tx3gnQ,20417
|
|
@@ -1040,7 +1040,7 @@ wagtail/blocks/__init__.py,sha256=VjRA2jnSMItNEqkMGtYQxFHzoefy8QbqTysjlFHnxpU,31
|
|
|
1040
1040
|
wagtail/blocks/base.py,sha256=H-dI5oEXN2paPEhW8gf45n42IdWF62vnw0ZUDELvdtw,27979
|
|
1041
1041
|
wagtail/blocks/definition_lookup.py,sha256=JkSwFcqEkavq-M6kWNfeDZtvIXnQJ58QT2FeaKrFPEA,3274
|
|
1042
1042
|
wagtail/blocks/field_block.py,sha256=rKXfquVsRbA80GnXQvgRI8mtYZ4t7eKRCqaSCpeOS94,32414
|
|
1043
|
-
wagtail/blocks/list_block.py,sha256=
|
|
1043
|
+
wagtail/blocks/list_block.py,sha256=_3qNE0L7UMAmwMYCZ5CKasf574tKO7eDUth8HInmo88,18403
|
|
1044
1044
|
wagtail/blocks/static_block.py,sha256=tKkU0hENu_fzHC9xiZ3p9c9drP7-TDogn9r8j0E-nLk,1748
|
|
1045
1045
|
wagtail/blocks/stream_block.py,sha256=amEWzaq4oiOUVf0Y2VRIfXhsDnRzd9hHBYhx-4SW8nE,32291
|
|
1046
1046
|
wagtail/blocks/struct_block.py,sha256=u-etS4B5ONd6_gYbL-F8XX3l_RY3zPMMsrxSTLXMOIs,15988
|
|
@@ -1056,7 +1056,7 @@ wagtail/contrib/forms/models.py,sha256=IqLRh9a9W0hDsO2HUgwfAOUzKWqeaTMvP-KT8VLWV
|
|
|
1056
1056
|
wagtail/contrib/forms/panels.py,sha256=zI3bFM1X5iT_fnxQUe5BWWN5iQKm6tEFEiaFhNRZcwk,1556
|
|
1057
1057
|
wagtail/contrib/forms/urls.py,sha256=VZ4LDq6SkdEi3iXL7zoxDRSNZeGS5ZSeiNUsfqZ-nOI,776
|
|
1058
1058
|
wagtail/contrib/forms/utils.py,sha256=Gu3WS-X37KQeDuHZliEwkhHJaqDgUwF1ObuVp3ai2fM,1279
|
|
1059
|
-
wagtail/contrib/forms/views.py,sha256
|
|
1059
|
+
wagtail/contrib/forms/views.py,sha256=-pBvZObLNKdwo7Hq5TiAXvrkstba0kKpm3-hjG3VZ18,13383
|
|
1060
1060
|
wagtail/contrib/forms/wagtail_hooks.py,sha256=VbHWejKs7Pp-KXtrcIqWOS476hpK9UuWBn1XF8qLmug,876
|
|
1061
1061
|
wagtail/contrib/forms/locale/af/LC_MESSAGES/django.mo,sha256=IT4kQ2iXzYtsLiFZcjhqZdbNqnigtbo1oWilPNx88L0,455
|
|
1062
1062
|
wagtail/contrib/forms/locale/af/LC_MESSAGES/django.po,sha256=ETEtWd1pbUDvlhOZoeGO4LHzOooQm5PHD_7IXKzUnU8,667
|
|
@@ -1190,7 +1190,7 @@ wagtail/contrib/forms/templates/wagtailforms/panels/form_responses_panel.html,sh
|
|
|
1190
1190
|
wagtail/contrib/forms/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1191
1191
|
wagtail/contrib/forms/tests/test_forms.py,sha256=7tRUwJA2j9xzr28NpRC9hDYeOEfR1VTmBCPlny7UPVw,13634
|
|
1192
1192
|
wagtail/contrib/forms/tests/test_models.py,sha256=lcifi_nJHHD9toYVtIY3P-zh-rdCTsLQTgxvAyFKbMM,32465
|
|
1193
|
-
wagtail/contrib/forms/tests/test_views.py,sha256=
|
|
1193
|
+
wagtail/contrib/forms/tests/test_views.py,sha256=UNcm3Y5pvDDUnjxEY-HNHaHBHj5YfgNJW2mL2zfCuGM,82860
|
|
1194
1194
|
wagtail/contrib/forms/tests/utils.py,sha256=OESefxdqGRgL1lDItVPSFNw_FJNB4X0PvozdvAhrpkc,6043
|
|
1195
1195
|
wagtail/contrib/frontend_cache/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1196
1196
|
wagtail/contrib/frontend_cache/apps.py,sha256=y-TyHADOpdCrIQ7zfnVD6OOxjo28lnBhPJeBtjlPih4,407
|
|
@@ -3554,7 +3554,7 @@ wagtail/test/manage.py,sha256=JaihE2eqQFMxzd83WWPE4DLnZbzq0bqEkozWAbe-xn8,255
|
|
|
3554
3554
|
wagtail/test/middleware.py,sha256=Tvt43O8iGOFvK1tpZFKHQndiJPO5AcrvzqrTzBjuTuY,1395
|
|
3555
3555
|
wagtail/test/non_root_urls.py,sha256=ZWPGHRmWHmx2Ext6S_TONDj4ZHdBt5BNZoULON1nDlA,556
|
|
3556
3556
|
wagtail/test/numberformat.py,sha256=FBKsX_92H97xHnb4Er5mAH2i3oFSorCQnKdGcjHlcgE,3771
|
|
3557
|
-
wagtail/test/settings.py,sha256=
|
|
3557
|
+
wagtail/test/settings.py,sha256=J6y_xiE5WWdWIaF7rxCfzJAMu9sfLpEYN3PqTNDuldU,9711
|
|
3558
3558
|
wagtail/test/settings_ui.py,sha256=FtNeC3qofOBsdfNT2ES0CDtwPq8Kth1Ym_l0QM5ZspE,886
|
|
3559
3559
|
wagtail/test/urls.py,sha256=OqO9tjttDsR04DFc5cPmVijFRnAJZiktLuUXSi8_Cok,2599
|
|
3560
3560
|
wagtail/test/urls_multilang.py,sha256=Pfif5_J3mDcf-AJEADTsm2dfFTQQWOlLMZHdPg2P8eA,310
|
|
@@ -3792,7 +3792,7 @@ wagtail/tests/test_revision_model.py,sha256=dvW9fGG6-V2WeNWpsIm9fP3jtRmJ6wj6pgqM
|
|
|
3792
3792
|
wagtail/tests/test_rich_text.py,sha256=bBTdI__z5QSq-Z3dPvGLUyHaodmi6mKMBl65dSrsJQw,17795
|
|
3793
3793
|
wagtail/tests/test_signals.py,sha256=MTP1e3dEQLt-JbV41JRlIeCzx9-g6grAFtOJgpwsEFI,6122
|
|
3794
3794
|
wagtail/tests/test_sites.py,sha256=syJCEPMHdKXfbxc_Vb7CH9ymuPVZiWDAae4JmJPmPx0,8488
|
|
3795
|
-
wagtail/tests/test_streamfield.py,sha256=
|
|
3795
|
+
wagtail/tests/test_streamfield.py,sha256=qIn-hGIWkm0PQvvbcm6ywiqjzizb4KkacRQqg0AOzAk,41312
|
|
3796
3796
|
wagtail/tests/test_telepath.py,sha256=muiOryoRmkISEHVu9GPSrKJEVB_EvpOufhvuJF-HrTk,10374
|
|
3797
3797
|
wagtail/tests/test_tests.py,sha256=BAWYYlrFls1rHsqRVsh_b9eW43t6MaXiswI-CkUI6fs,18272
|
|
3798
3798
|
wagtail/tests/test_translatablemixin.py,sha256=bCHX65L-3SMtgXU7XEdG0NYV4G5-V93TzzHX24ubcl8,10283
|
|
@@ -4002,9 +4002,9 @@ wagtail/utils/urlpatterns.py,sha256=RDhVScxdm-RV4HSMjWElyrbEoTPsXu841_SKMgoFKtY,
|
|
|
4002
4002
|
wagtail/utils/utils.py,sha256=nQhfy-fOiZfUFr67kTX4nF_2VVH7_MDtjTDOzZdpPTE,1407
|
|
4003
4003
|
wagtail/utils/version.py,sha256=jYCDKIGJD3bZHTpgXMXu14oSBArQnf2WVU979D8V4b0,1552
|
|
4004
4004
|
wagtail/utils/widgets.py,sha256=ibAvxHCjNw06bMlTD7wvrwmGEMNS3NzrnSKREGfPF44,1775
|
|
4005
|
-
wagtail-6.3.
|
|
4006
|
-
wagtail-6.3.
|
|
4007
|
-
wagtail-6.3.
|
|
4008
|
-
wagtail-6.3.
|
|
4009
|
-
wagtail-6.3.
|
|
4010
|
-
wagtail-6.3.
|
|
4005
|
+
wagtail-6.3.5.dist-info/licenses/LICENSE,sha256=0aiL7_RJ2YkOjscmRI7opwmuURrY6h8MR0B24nrdRQU,1512
|
|
4006
|
+
wagtail-6.3.5.dist-info/METADATA,sha256=F-N7gkGMVIUbB7J38XkMG2EReeqtGBUzoBLjHaNcotM,3787
|
|
4007
|
+
wagtail-6.3.5.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
4008
|
+
wagtail-6.3.5.dist-info/entry_points.txt,sha256=R14Z0xKoufNcDaku0EWDKM-K8J4ap0EImO8C-df8HVM,53
|
|
4009
|
+
wagtail-6.3.5.dist-info/top_level.txt,sha256=zcKgvuRTi0gSgVzJ1qMoERCwhQ_i0n9bkyxza3oh9as,8
|
|
4010
|
+
wagtail-6.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|