wagtail 6.2.2__py3-none-any.whl → 6.2.3__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/admin/static/wagtailadmin/js/draftail.js +1 -1
- wagtail/admin/tests/test_audit_log.py +22 -0
- wagtail/admin/tests/test_workflows.py +27 -0
- wagtail/admin/views/generic/history.py +1 -0
- wagtail/admin/views/workflows.py +2 -6
- {wagtail-6.2.2.dist-info → wagtail-6.2.3.dist-info}/METADATA +2 -3
- {wagtail-6.2.2.dist-info → wagtail-6.2.3.dist-info}/RECORD +12 -12
- {wagtail-6.2.2.dist-info → wagtail-6.2.3.dist-info}/LICENSE +0 -0
- {wagtail-6.2.2.dist-info → wagtail-6.2.3.dist-info}/WHEEL +0 -0
- {wagtail-6.2.2.dist-info → wagtail-6.2.3.dist-info}/entry_points.txt +0 -0
- {wagtail-6.2.2.dist-info → wagtail-6.2.3.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from datetime import timedelta
|
|
2
|
+
from io import StringIO
|
|
2
3
|
|
|
3
4
|
from django.conf import settings
|
|
4
5
|
from django.contrib.auth.models import Group, Permission
|
|
6
|
+
from django.core.management import call_command
|
|
5
7
|
from django.test import TestCase
|
|
6
8
|
from django.urls import reverse
|
|
7
9
|
from django.utils import timezone
|
|
@@ -305,6 +307,26 @@ class TestAuditLogAdmin(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
305
307
|
response = self.client.get(reverse("wagtailadmin_reports:site_history"))
|
|
306
308
|
self.assertContains(response, expected_deleted_string)
|
|
307
309
|
|
|
310
|
+
def test_page_history_after_revision_purge(self):
|
|
311
|
+
self._update_page(self.hello_page)
|
|
312
|
+
call_command("purge_revisions", days=0, stdout=StringIO())
|
|
313
|
+
|
|
314
|
+
history_url = reverse(
|
|
315
|
+
"wagtailadmin_pages:history", kwargs={"page_id": self.hello_page.id}
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
self.login(user=self.editor)
|
|
319
|
+
|
|
320
|
+
response = self.client.get(history_url)
|
|
321
|
+
self.assertEqual(response.status_code, 200)
|
|
322
|
+
|
|
323
|
+
self.assertContains(response, "Created", 1)
|
|
324
|
+
self.assertContains(response, "Draft saved", 2)
|
|
325
|
+
self.assertContains(response, "Locked", 1)
|
|
326
|
+
self.assertContains(response, "Unlocked", 1)
|
|
327
|
+
self.assertContains(response, "Page scheduled for publishing", 1)
|
|
328
|
+
self.assertContains(response, "Published", 1)
|
|
329
|
+
|
|
308
330
|
def test_edit_form_has_history_link(self):
|
|
309
331
|
self.hello_page.save_revision()
|
|
310
332
|
self.login(user=self.editor)
|
|
@@ -162,6 +162,33 @@ class TestWorkflowsIndexView(AdminTemplateTestUtils, WagtailTestUtils, TestCase)
|
|
|
162
162
|
self.assertNotContains(response, "There are no enabled workflows.")
|
|
163
163
|
self.assertContains(response, "test_workflow")
|
|
164
164
|
|
|
165
|
+
def test_multiple_snippets_assigned_to_workflow(self):
|
|
166
|
+
Workflow.objects.create(name="Nocontenttypes")
|
|
167
|
+
multi_ct_workflow = Workflow.objects.create(name="Multicontenttypes")
|
|
168
|
+
for model in [FullFeaturedSnippet, ModeratedModel]:
|
|
169
|
+
WorkflowContentType.objects.create(
|
|
170
|
+
workflow=multi_ct_workflow,
|
|
171
|
+
content_type=ContentType.objects.get_for_model(model),
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
response = self.get()
|
|
175
|
+
self.assertEqual(response.status_code, 200)
|
|
176
|
+
soup = self.get_soup(response.content)
|
|
177
|
+
cells = [
|
|
178
|
+
text
|
|
179
|
+
for td in soup.select("td")
|
|
180
|
+
if (text := td.get_text(separator=" | ", strip=True))
|
|
181
|
+
]
|
|
182
|
+
self.assertEqual(
|
|
183
|
+
cells,
|
|
184
|
+
[
|
|
185
|
+
"Multicontenttypes",
|
|
186
|
+
"0 pages | 2 snippet types",
|
|
187
|
+
"Nocontenttypes",
|
|
188
|
+
"0 pages | 0 snippet types",
|
|
189
|
+
],
|
|
190
|
+
)
|
|
191
|
+
|
|
165
192
|
def test_num_queries(self):
|
|
166
193
|
self.create_workflows()
|
|
167
194
|
self.get()
|
wagtail/admin/views/workflows.py
CHANGED
|
@@ -4,7 +4,7 @@ from django.contrib.contenttypes.models import ContentType
|
|
|
4
4
|
from django.core.exceptions import PermissionDenied
|
|
5
5
|
from django.core.paginator import Paginator
|
|
6
6
|
from django.db import transaction
|
|
7
|
-
from django.db.models import Count,
|
|
7
|
+
from django.db.models import Count, Prefetch
|
|
8
8
|
from django.db.models.functions import Lower
|
|
9
9
|
from django.http import Http404, HttpResponseBadRequest
|
|
10
10
|
from django.shortcuts import get_object_or_404, redirect, render
|
|
@@ -37,7 +37,6 @@ from wagtail.models import (
|
|
|
37
37
|
Task,
|
|
38
38
|
TaskState,
|
|
39
39
|
Workflow,
|
|
40
|
-
WorkflowContentType,
|
|
41
40
|
WorkflowState,
|
|
42
41
|
WorkflowTask,
|
|
43
42
|
)
|
|
@@ -146,10 +145,7 @@ class Index(IndexView):
|
|
|
146
145
|
|
|
147
146
|
def get_base_queryset(self):
|
|
148
147
|
queryset = super().get_base_queryset()
|
|
149
|
-
|
|
150
|
-
workflow=OuterRef("pk")
|
|
151
|
-
).values_list("pk", flat=True)
|
|
152
|
-
queryset = queryset.annotate(content_types=Count(content_types))
|
|
148
|
+
queryset = queryset.annotate(content_types=Count("workflow_content_types"))
|
|
153
149
|
return queryset.prefetch_related(
|
|
154
150
|
"workflow_pages",
|
|
155
151
|
"workflow_pages__page",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wagtail
|
|
3
|
-
Version: 6.2.
|
|
3
|
+
Version: 6.2.3
|
|
4
4
|
Summary: A Django content management system.
|
|
5
5
|
Home-page: https://wagtail.org/
|
|
6
6
|
Author: Wagtail core team + contributors
|
|
@@ -51,9 +51,8 @@ Requires-Dist: pyenchant (<4,>=3.1.1) ; extra == 'docs'
|
|
|
51
51
|
Requires-Dist: sphinxcontrib-spelling (<8,>=7) ; extra == 'docs'
|
|
52
52
|
Requires-Dist: Sphinx (>=7.0) ; extra == 'docs'
|
|
53
53
|
Requires-Dist: sphinx-autobuild (>=0.6.0) ; extra == 'docs'
|
|
54
|
-
Requires-Dist: sphinx-wagtail-theme (==6.
|
|
54
|
+
Requires-Dist: sphinx-wagtail-theme (==6.4.0) ; extra == 'docs'
|
|
55
55
|
Requires-Dist: myst-parser (==2.0.0) ; extra == 'docs'
|
|
56
|
-
Requires-Dist: sphinx-copybutton (<1.0,>=0.5) ; extra == 'docs'
|
|
57
56
|
Provides-Extra: testing
|
|
58
57
|
Requires-Dist: python-dateutil (>=2.7) ; extra == 'testing'
|
|
59
58
|
Requires-Dist: pytz (>=2014.7) ; extra == 'testing'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
wagtail/__init__.py,sha256=
|
|
1
|
+
wagtail/__init__.py,sha256=nF1GK52NX4PquGTT1TBwc2MBR3D6zQpWjJVXx5TZzUI,724
|
|
2
2
|
wagtail/apps.py,sha256=38kXTdHoQzFnpUqDNxFpsqn2dut4V0u9rLOkhqCoYkc,713
|
|
3
3
|
wagtail/compat.py,sha256=L41FhlX4xy5KgTdJ63smtM78mtKf1mxkPeOs8kyOwS0,538
|
|
4
4
|
wagtail/coreutils.py,sha256=HIE2FCgFgi9IfVIs85E8onbQIJFAij92XNdNFNUCb70,20655
|
|
@@ -388,7 +388,7 @@ wagtail/admin/static/wagtailadmin/js/comments.js,sha256=nwfjUdZ-klg_lLpnnw6Ui7bY
|
|
|
388
388
|
wagtail/admin/static/wagtailadmin/js/core.js,sha256=l1gVCKhhFWMVVvwDfE5aqiqkSN275rCpYIVzNedSV64,99221
|
|
389
389
|
wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt,sha256=dTzaqHjW_XEepDXUcpWz5hu9q-A1Lxr6tE4l4xE3lhY,125
|
|
390
390
|
wagtail/admin/static/wagtailadmin/js/date-time-chooser.js,sha256=3hETl9qsULtkBwcnuZRFLahg4YggsY0xUeDD6SZUEYw,3376
|
|
391
|
-
wagtail/admin/static/wagtailadmin/js/draftail.js,sha256=
|
|
391
|
+
wagtail/admin/static/wagtailadmin/js/draftail.js,sha256=bA1n48GDvpTHvJxsTQQJjXdEuazbiC-bmmzXggRn0nk,293931
|
|
392
392
|
wagtail/admin/static/wagtailadmin/js/draftail.js.LICENSE.txt,sha256=97l5UAKNdHRm-wg_QYro4Ch4ElJtzAVshVlxSIbL9z8,255
|
|
393
393
|
wagtail/admin/static/wagtailadmin/js/expanding-formset.js,sha256=vDyyVEGdfsnBlEDHAeOokwDZMHTCWkcyjvoD2G1NgKQ,1594
|
|
394
394
|
wagtail/admin/static/wagtailadmin/js/filtered-select.js,sha256=LXL9VQc8RQmpz1jy1Rx5HidtmoPWu-YZR63CvYdPf0I,2197
|
|
@@ -854,7 +854,7 @@ wagtail/admin/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
854
854
|
wagtail/admin/tests/benches.py,sha256=7zdQSI4Ns0IV2u3WGQTsz25MmMHoT4HEpfii1n4XtQ8,3023
|
|
855
855
|
wagtail/admin/tests/test_account_management.py,sha256=UAvHfLbNB3BMj2DEOKNM8uuxKm8JkkNawNS9ar73fso,38025
|
|
856
856
|
wagtail/admin/tests/test_admin_search.py,sha256=tZv6zyCEr6xaiUeCx1N1CFKFfXfnObAEqKRtUjd25Q0,7359
|
|
857
|
-
wagtail/admin/tests/test_audit_log.py,sha256=
|
|
857
|
+
wagtail/admin/tests/test_audit_log.py,sha256=puQf3hDLwojFbUf1eRdQ-JI2FkHLR9YD99-SjONTu0s,19141
|
|
858
858
|
wagtail/admin/tests/test_buttons_hooks.py,sha256=VYFuYBa1BiffKmeMGaicvyBsqUyWuIINC-ZGnz9WRF0,20502
|
|
859
859
|
wagtail/admin/tests/test_checks.py,sha256=SrywlN77bD_ot6WWO6Ng3YdXuFg-FK7YyBcaeNH9Z6w,4546
|
|
860
860
|
wagtail/admin/tests/test_collections_views.py,sha256=x6Y6GCsi8sIFCN9MZmJxnsjlKf8wa4rWNVjDWkm_IfU,31701
|
|
@@ -887,7 +887,7 @@ wagtail/admin/tests/test_views.py,sha256=eYpa4IC1ipWcl8f3LXEBlp8sJrbvg80pQT12tg6
|
|
|
887
887
|
wagtail/admin/tests/test_views_generic.py,sha256=HrCYFQlj__hOuNcFNG4GAjzQzUzOsFtPqVO0MbP9_wA,2931
|
|
888
888
|
wagtail/admin/tests/test_whats_new.py,sha256=Vptrf94ilJephOP3O7s1FKLtjNxFLCne6Bi4c_VlJzw,5570
|
|
889
889
|
wagtail/admin/tests/test_widgets.py,sha256=3NIcu5Ktx6i5kAn8kSdW3HBg-SSVi8BspR-THj8aQ0Y,24656
|
|
890
|
-
wagtail/admin/tests/test_workflows.py,sha256=
|
|
890
|
+
wagtail/admin/tests/test_workflows.py,sha256=XaBR7iaNzz6eAUeLTRc8kr73OOjBXC53QrxjIKnvt0k,178059
|
|
891
891
|
wagtail/admin/tests/tests.py,sha256=GoPO8R3hdX1DpHIugy_8fvL0sGSybesVEAL_BRoyvLE,21278
|
|
892
892
|
wagtail/admin/tests/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
893
893
|
wagtail/admin/tests/api/test_documents.py,sha256=2dfjTi6Bj3otRQ-ok9f3rwl-HpSmprfcmhWyYPDnXcs,5051
|
|
@@ -955,7 +955,7 @@ wagtail/admin/views/home.py,sha256=u88JvZdh_fjMqvM2l2PKx8HhcURZemOEBhuzr5MKwTQ,1
|
|
|
955
955
|
wagtail/admin/views/mixins.py,sha256=SaIe2YwuRFK7segVdIRaughf3_xsAgV5zAV2HTiTRhA,12975
|
|
956
956
|
wagtail/admin/views/page_privacy.py,sha256=CBDaf8ElLesuco9Z3WLqdscPtoDRiGmxLPPWmWjHT7Q,3472
|
|
957
957
|
wagtail/admin/views/tags.py,sha256=ZxV-Nzme28b8WaKTk96SFiFOKd_qS2SiQOoaOFUJwjE,812
|
|
958
|
-
wagtail/admin/views/workflows.py,sha256=
|
|
958
|
+
wagtail/admin/views/workflows.py,sha256=EQIz1UR8QRniKr6X2iQ7LttPZ34i4Y5myfJ47FcconY,34789
|
|
959
959
|
wagtail/admin/views/bulk_action/__init__.py,sha256=vvb1oKmExfxl6cd6g7YaCO4LSwxWNoRFdkqgemDBNeI,106
|
|
960
960
|
wagtail/admin/views/bulk_action/base_bulk_action.py,sha256=UuidpHVm3uQTI6zRYxwSgxZNkAVP_XCWhkCEMW0Wu1s,5201
|
|
961
961
|
wagtail/admin/views/bulk_action/dispatcher.py,sha256=fqhOJ3tyRwIDP474vewlsAq1FgP48AgKOvdiySxDlto,504
|
|
@@ -963,7 +963,7 @@ wagtail/admin/views/bulk_action/registry.py,sha256=e9-rN9TdHUmRwDfTeauvPUjE6p3ip
|
|
|
963
963
|
wagtail/admin/views/generic/__init__.py,sha256=XSpUylwSEv32pR3pVZmF6lo6KGBqthS6b3y5neXvsW4,730
|
|
964
964
|
wagtail/admin/views/generic/base.py,sha256=c9kgi1JdtUUEyRBqYulJRsiD3SFC0zPDZwCCFRRaP7I,17737
|
|
965
965
|
wagtail/admin/views/generic/chooser.py,sha256=pjOYGcYBHc1ZkZJ4LWcHkoGNQ7U7GdKBsJZ0vyOO4kc,18061
|
|
966
|
-
wagtail/admin/views/generic/history.py,sha256=
|
|
966
|
+
wagtail/admin/views/generic/history.py,sha256=XGbu1HbAj3N-NYEeC90_O7sWilaqRqz2d-6G3LgXeCk,17685
|
|
967
967
|
wagtail/admin/views/generic/lock.py,sha256=dvZ613n3itNAhO3zdQzGRewm2kH-dyemx-LSuUC2AHM,1435
|
|
968
968
|
wagtail/admin/views/generic/mixins.py,sha256=FqHQOqwPPqQxGRqJEZx7hW2cIuUvZRrpFfuJrLTfWDE,29915
|
|
969
969
|
wagtail/admin/views/generic/models.py,sha256=ugKntUQWiifWqMGW9YNimpFfxUT0o988LIosY8M0Tuk,51058
|
|
@@ -4009,9 +4009,9 @@ wagtail/utils/urlpatterns.py,sha256=RDhVScxdm-RV4HSMjWElyrbEoTPsXu841_SKMgoFKtY,
|
|
|
4009
4009
|
wagtail/utils/utils.py,sha256=nQhfy-fOiZfUFr67kTX4nF_2VVH7_MDtjTDOzZdpPTE,1407
|
|
4010
4010
|
wagtail/utils/version.py,sha256=jYCDKIGJD3bZHTpgXMXu14oSBArQnf2WVU979D8V4b0,1552
|
|
4011
4011
|
wagtail/utils/widgets.py,sha256=ibAvxHCjNw06bMlTD7wvrwmGEMNS3NzrnSKREGfPF44,1775
|
|
4012
|
-
wagtail-6.2.
|
|
4013
|
-
wagtail-6.2.
|
|
4014
|
-
wagtail-6.2.
|
|
4015
|
-
wagtail-6.2.
|
|
4016
|
-
wagtail-6.2.
|
|
4017
|
-
wagtail-6.2.
|
|
4012
|
+
wagtail-6.2.3.dist-info/LICENSE,sha256=0aiL7_RJ2YkOjscmRI7opwmuURrY6h8MR0B24nrdRQU,1512
|
|
4013
|
+
wagtail-6.2.3.dist-info/METADATA,sha256=oR_DNSZgg38xmVK-4rh6DOtUt-FylIUSWKjwDNSM48g,3694
|
|
4014
|
+
wagtail-6.2.3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
4015
|
+
wagtail-6.2.3.dist-info/entry_points.txt,sha256=R14Z0xKoufNcDaku0EWDKM-K8J4ap0EImO8C-df8HVM,53
|
|
4016
|
+
wagtail-6.2.3.dist-info/top_level.txt,sha256=zcKgvuRTi0gSgVzJ1qMoERCwhQ_i0n9bkyxza3oh9as,8
|
|
4017
|
+
wagtail-6.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|