wagtail 6.3.2__py3-none-any.whl → 6.4rc1__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/actions/publish_revision.py +4 -5
- wagtail/admin/auth.py +0 -2
- wagtail/admin/checks.py +1 -1
- wagtail/admin/filters.py +3 -1
- wagtail/admin/forms/account.py +21 -11
- wagtail/admin/forms/collections.py +2 -9
- wagtail/admin/forms/formsets.py +32 -0
- wagtail/admin/forms/pages.py +5 -1
- wagtail/admin/forms/workflows.py +2 -13
- wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ar/LC_MESSAGES/django.po +68 -1
- wagtail/admin/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ar/LC_MESSAGES/djangojs.po +5 -1
- wagtail/admin/locale/en/LC_MESSAGES/django.po +312 -356
- wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +21 -16
- wagtail/admin/menu.py +0 -13
- wagtail/admin/panels/base.py +2 -2
- wagtail/admin/panels/group.py +4 -1
- wagtail/admin/panels/inline_panel.py +5 -2
- wagtail/admin/panels/model_utils.py +36 -0
- wagtail/admin/panels/page_utils.py +2 -40
- wagtail/admin/panels/signal_handlers.py +0 -2
- wagtail/admin/static/wagtailadmin/css/core.css +1 -1
- wagtail/admin/static/wagtailadmin/css/panels/draftail.css +1 -1
- wagtail/admin/static/wagtailadmin/css/panels/streamfield.css +1 -1
- wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
- wagtail/admin/static/wagtailadmin/js/core.js +1 -1
- wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt +1 -8
- wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
- wagtail/admin/static/wagtailadmin/js/modal-workflow.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/privacy-switch.js +1 -1
- wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
- wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +7 -0
- wagtail/admin/templates/wagtailadmin/404.html +4 -0
- wagtail/admin/templates/wagtailadmin/chooser/browse.html +2 -1
- wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html +1 -1
- wagtail/admin/templates/wagtailadmin/collections/_privacy_switch.html +8 -1
- wagtail/admin/templates/wagtailadmin/generic/confirm_delete.html +15 -9
- wagtail/admin/templates/wagtailadmin/generic/confirm_unpublish.html +21 -25
- wagtail/admin/templates/wagtailadmin/generic/form.html +1 -1
- wagtail/admin/templates/wagtailadmin/generic/preview_error.html +3 -0
- wagtail/admin/templates/wagtailadmin/generic/revisions/compare.html +63 -76
- wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +0 -2
- wagtail/admin/templates/wagtailadmin/pages/edit.html +1 -5
- wagtail/admin/templates/wagtailadmin/panels/inline_panel_child.html +1 -0
- wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_form.html +1 -1
- wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_formset.html +6 -22
- wagtail/admin/templates/wagtailadmin/shared/formatted_field.html +2 -2
- wagtail/admin/templates/wagtailadmin/shared/header.html +2 -2
- wagtail/admin/templates/wagtailadmin/shared/page_status_tag_new.html +32 -39
- wagtail/admin/templates/wagtailadmin/shared/revisions/confirm_unschedule.html +13 -17
- wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/privacy.html +15 -3
- wagtail/admin/templates/wagtailadmin/shared/side_panels/preview.html +1 -1
- wagtail/admin/templates/wagtailadmin/skeleton.html +4 -2
- wagtail/admin/templates/wagtailadmin/workflows/create.html +1 -1
- wagtail/admin/templates/wagtailadmin/workflows/edit.html +1 -1
- wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_pages_form.html +1 -1
- wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_pages_formset.html +6 -23
- wagtail/admin/templatetags/wagtailadmin_tags.py +12 -0
- wagtail/admin/templatetags/wagtailuserbar.py +2 -3
- wagtail/admin/tests/pages/test_create_page.py +110 -1
- wagtail/admin/tests/pages/test_edit_page.py +3 -2
- wagtail/admin/tests/pages/test_explorer_view.py +18 -0
- wagtail/admin/tests/pages/test_page_usage.py +24 -20
- wagtail/admin/tests/pages/test_preview.py +69 -1
- wagtail/admin/tests/pages/test_revisions.py +40 -6
- wagtail/admin/tests/test_account_management.py +39 -1
- wagtail/admin/tests/test_audit_log.py +4 -2
- wagtail/admin/tests/test_block_preview.py +224 -0
- wagtail/admin/tests/test_edit_handlers.py +23 -6
- wagtail/admin/tests/test_page_chooser.py +50 -3
- wagtail/admin/tests/test_privacy.py +49 -26
- wagtail/admin/tests/test_site_summary.py +15 -10
- wagtail/admin/tests/test_templatetags.py +19 -0
- wagtail/admin/tests/test_userbar.py +82 -1
- wagtail/admin/tests/test_views_generic.py +27 -12
- wagtail/admin/tests/test_workflows.py +69 -0
- wagtail/admin/tests/tests.py +23 -4
- wagtail/admin/tests/ui/test_sidebar.py +1 -1
- wagtail/admin/tests/viewsets/test_model_viewset.py +15 -13
- wagtail/admin/ui/side_panels.py +7 -4
- wagtail/admin/urls/__init__.py +6 -0
- wagtail/admin/urls/pages.py +1 -1
- wagtail/admin/userbar.py +21 -1
- wagtail/admin/views/account.py +5 -0
- wagtail/admin/views/chooser.py +5 -1
- wagtail/admin/views/collections.py +0 -2
- wagtail/admin/views/generic/base.py +20 -10
- wagtail/admin/views/generic/history.py +0 -1
- wagtail/admin/views/generic/models.py +79 -21
- wagtail/admin/views/generic/preview.py +50 -1
- wagtail/admin/views/mixins.py +4 -2
- wagtail/admin/views/pages/bulk_actions/delete.py +11 -23
- wagtail/admin/views/pages/bulk_actions/page_bulk_action.py +17 -0
- wagtail/admin/views/pages/bulk_actions/publish.py +11 -31
- wagtail/admin/views/pages/bulk_actions/unpublish.py +11 -31
- wagtail/admin/views/pages/create.py +1 -0
- wagtail/admin/views/pages/edit.py +38 -30
- wagtail/admin/views/pages/revisions.py +43 -114
- wagtail/admin/views/pages/utils.py +0 -1
- wagtail/admin/views/tags.py +6 -2
- wagtail/admin/views/workflows.py +8 -6
- wagtail/admin/viewsets/model.py +0 -4
- wagtail/admin/viewsets/pages.py +0 -1
- wagtail/admin/widgets/tags.py +1 -0
- wagtail/api/v2/tests/test_documents.py +4 -2
- wagtail/api/v2/tests/test_images.py +4 -2
- wagtail/api/v2/tests/test_pages.py +8 -4
- wagtail/blocks/base.py +59 -1
- wagtail/blocks/field_block.py +6 -0
- wagtail/blocks/list_block.py +4 -0
- wagtail/blocks/static_block.py +3 -0
- wagtail/blocks/stream_block.py +5 -1
- wagtail/blocks/struct_block.py +6 -0
- wagtail/compat.py +16 -0
- wagtail/contrib/forms/forms.py +27 -7
- wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/tests/test_models.py +7 -5
- wagtail/contrib/forms/tests/test_views.py +75 -0
- wagtail/contrib/frontend_cache/tasks.py +83 -0
- wagtail/contrib/frontend_cache/tests.py +47 -32
- wagtail/contrib/frontend_cache/utils.py +2 -70
- wagtail/contrib/redirects/base_formats.py +2 -2
- wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +3 -0
- wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +24 -37
- wagtail/contrib/redirects/templates/wagtailredirects/add.html +1 -24
- wagtail/contrib/redirects/templates/wagtailredirects/confirm_delete.html +3 -13
- wagtail/contrib/redirects/tests/test_redirects.py +122 -110
- wagtail/contrib/redirects/tests/test_signal_handlers.py +75 -69
- wagtail/contrib/redirects/urls.py +2 -2
- wagtail/contrib/redirects/views.py +35 -73
- wagtail/contrib/search_promotions/admin_urls.py +10 -3
- wagtail/contrib/search_promotions/forms.py +55 -26
- wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +44 -54
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/add.html +21 -31
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/confirm_delete.html +3 -12
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/edit.html +11 -34
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotion_form.html +1 -0
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js +2 -1
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/index.html +0 -1
- wagtail/contrib/search_promotions/tests.py +814 -13
- wagtail/contrib/search_promotions/views/__init__.py +1 -0
- wagtail/contrib/search_promotions/views/reports.py +56 -0
- wagtail/contrib/search_promotions/views/settings.py +258 -0
- wagtail/contrib/search_promotions/wagtail_hooks.py +12 -1
- wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +6 -1
- wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +3 -3
- wagtail/contrib/settings/templates/wagtailsettings/edit.html +1 -5
- wagtail/contrib/settings/tests/generic/test_admin.py +2 -5
- wagtail/contrib/settings/tests/generic/test_register.py +1 -1
- wagtail/contrib/settings/tests/site_specific/test_admin.py +2 -5
- wagtail/contrib/settings/tests/site_specific/test_register.py +1 -1
- wagtail/contrib/settings/views.py +9 -23
- wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/tests.py +4 -1
- wagtail/contrib/typed_table_block/blocks.py +3 -0
- wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
- wagtail/contrib/typed_table_block/static/typed_table_block/js/typed_table_block.js +1 -1
- wagtail/contrib/typed_table_block/tests.py +33 -0
- wagtail/documents/locale/en/LC_MESSAGES/django.po +26 -26
- wagtail/documents/migrations/0011_add_choose_permissions.py +1 -0
- wagtail/documents/models.py +1 -0
- wagtail/documents/signal_handlers.py +6 -2
- wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
- wagtail/documents/templates/wagtaildocs/documents/edit.html +1 -3
- wagtail/documents/templates/wagtaildocs/multiple/add.html +7 -1
- wagtail/documents/tests/test_admin_views.py +74 -33
- wagtail/documents/tests/test_views.py +21 -12
- wagtail/documents/views/chooser.py +1 -0
- wagtail/documents/views/documents.py +1 -2
- wagtail/documents/views/multiple.py +0 -1
- wagtail/documents/views/serve.py +9 -2
- wagtail/documents/wagtail_hooks.py +6 -1
- wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/oembed_providers.py +0 -64
- wagtail/fields.py +3 -0
- wagtail/images/apps.py +2 -1
- wagtail/images/blocks.py +6 -2
- wagtail/images/forms.py +40 -3
- wagtail/images/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ar/LC_MESSAGES/django.po +4 -0
- wagtail/images/locale/en/LC_MESSAGES/django.po +49 -49
- wagtail/images/migrations/0023_add_choose_permissions.py +1 -0
- wagtail/images/rich_text/contentstate.py +1 -0
- wagtail/images/rich_text/editor_html.py +1 -0
- wagtail/images/signal_handlers.py +17 -10
- wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
- wagtail/images/static/wagtailimages/js/image-block.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser-telepath.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser.js +1 -1
- wagtail/images/static/wagtailimages/js/image-url-generator.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-image.js +1 -1
- wagtail/images/tasks.py +18 -0
- wagtail/images/templates/wagtailimages/images/edit.html +1 -3
- wagtail/images/templates/wagtailimages/images/url_generator.html +1 -1
- wagtail/images/templates/wagtailimages/multiple/add.html +7 -2
- wagtail/images/templates/wagtailimages/widgets/image_chooser.html +1 -1
- wagtail/images/tests/test_admin_views.py +53 -29
- wagtail/images/tests/test_blocks.py +3 -2
- wagtail/images/tests/test_models.py +12 -10
- wagtail/images/tests/tests.py +10 -0
- wagtail/images/views/chooser.py +1 -0
- wagtail/images/views/images.py +1 -3
- wagtail/images/views/multiple.py +0 -1
- wagtail/images/views/serve.py +18 -2
- wagtail/images/widgets.py +3 -0
- wagtail/locale/en/LC_MESSAGES/django.po +228 -216
- wagtail/locales/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/management/commands/publish_scheduled.py +1 -1
- wagtail/migrations/0087_alter_grouppagepermission_unique_together_and_more.py +16 -8
- wagtail/models/__init__.py +300 -119
- wagtail/models/i18n.py +2 -2
- wagtail/models/panels.py +37 -0
- wagtail/models/sites.py +7 -6
- wagtail/permission_policies/pages.py +2 -2
- wagtail/project_template/project_name/settings/base.py +4 -0
- wagtail/project_template/requirements.txt +1 -1
- wagtail/query.py +145 -0
- wagtail/search/backends/database/mysql/mysql.py +25 -17
- wagtail/search/backends/database/postgres/postgres.py +44 -83
- wagtail/search/backends/database/sqlite/sqlite.py +25 -17
- wagtail/search/backends/elasticsearch7.py +4 -0
- wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/search/query.py +8 -2
- wagtail/search/signal_handlers.py +6 -9
- wagtail/search/tasks.py +10 -0
- wagtail/search/tests/test_elasticsearch7_backend.py +21 -0
- wagtail/search/tests/test_index_functions.py +10 -6
- wagtail/search/tests/test_postgres_backend.py +0 -14
- wagtail/signal_handlers.py +5 -20
- wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/en/LC_MESSAGES/django.po +3 -13
- wagtail/snippets/tests/test_preview.py +5 -0
- wagtail/snippets/tests/test_snippets.py +100 -45
- wagtail/snippets/tests/test_usage.py +29 -24
- wagtail/snippets/tests/test_viewset.py +1 -1
- wagtail/snippets/views/snippets.py +0 -12
- wagtail/tasks.py +41 -0
- wagtail/templates/wagtailcore/shared/block_preview.html +29 -0
- wagtail/test/earlypage/__init__.py +0 -0
- wagtail/test/earlypage/migrations/0001_initial.py +37 -0
- wagtail/test/earlypage/migrations/__init__.py +0 -0
- wagtail/test/earlypage/models.py +14 -0
- wagtail/test/settings.py +3 -0
- wagtail/test/testapp/fixtures/test.json +7 -0
- wagtail/test/testapp/fixtures/test_specific.json +6 -3
- wagtail/test/testapp/models.py +58 -44
- wagtail/test/testapp/templates/tests/custom_block_preview.html +16 -0
- wagtail/test/testapp/templates/tests/static_block_preview.html +5 -0
- wagtail/test/testapp/wagtail_hooks.py +9 -0
- wagtail/tests/test_blocks.py +189 -2
- wagtail/tests/test_hooks.py +166 -1
- wagtail/tests/test_management_commands.py +54 -13
- wagtail/tests/test_page_allowed_http_methods.py +32 -0
- wagtail/tests/test_page_model.py +68 -0
- wagtail/tests/test_page_privacy.py +10 -0
- wagtail/tests/test_page_queryset.py +79 -0
- wagtail/tests/test_reference_index.py +84 -75
- wagtail/tests/test_streamfield.py +30 -0
- wagtail/tests/test_utils.py +61 -0
- wagtail/users/forms.py +2 -9
- wagtail/users/locale/en/LC_MESSAGES/django.po +17 -17
- wagtail/users/templates/wagtailusers/groups/create.html +0 -5
- wagtail/users/templates/wagtailusers/groups/includes/page_permissions_form.html +1 -1
- wagtail/users/templates/wagtailusers/groups/includes/page_permissions_formset.html +6 -6
- wagtail/users/tests/test_admin_views.py +96 -4
- wagtail/users/tests/test_utils.py +76 -0
- wagtail/users/utils.py +43 -11
- wagtail/utils/setup.py +2 -2
- wagtail/utils/templates.py +26 -0
- wagtail/utils/widgets.py +1 -0
- wagtail/views.py +9 -1
- wagtail/wagtail_hooks.py +67 -29
- {wagtail-6.3.2.dist-info → wagtail-6.4rc1.dist-info}/METADATA +2 -2
- {wagtail-6.3.2.dist-info → wagtail-6.4rc1.dist-info}/RECORD +289 -276
- wagtail/admin/static/wagtailadmin/js/expanding-formset.js +0 -1
- wagtail/admin/static/wagtailadmin/js/vendor/rangy-core.js +0 -1
- wagtail/admin/static/wagtailadmin/js/vendor/uuidv4.min.js +0 -1
- wagtail/contrib/search_promotions/views.py +0 -323
- wagtail/images/static/wagtailimages/js/vendor/canvas-to-blob.min.js +0 -1
- wagtail/users/static/wagtailusers/js/group-form.js +0 -1
- wagtail/users/templates/wagtailusers/groups/includes/group_form_js.html +0 -3
- {wagtail-6.3.2.dist-info → wagtail-6.4rc1.dist-info}/LICENSE +0 -0
- {wagtail-6.3.2.dist-info → wagtail-6.4rc1.dist-info}/WHEEL +0 -0
- {wagtail-6.3.2.dist-info → wagtail-6.4rc1.dist-info}/entry_points.txt +0 -0
- {wagtail-6.3.2.dist-info → wagtail-6.4rc1.dist-info}/top_level.txt +0 -0
|
@@ -2,11 +2,11 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
4
4
|
|
|
5
|
-
#: src/components/Sidebar/menu/SubMenuItem.tsx:
|
|
5
|
+
#: src/components/Sidebar/menu/SubMenuItem.tsx:122
|
|
6
6
|
msgid "(%(number)s new items in this menu)"
|
|
7
7
|
msgstr ""
|
|
8
8
|
|
|
9
|
-
#: src/components/Sidebar/menu/SubMenuItem.tsx:
|
|
9
|
+
#: src/components/Sidebar/menu/SubMenuItem.tsx:121
|
|
10
10
|
msgid "(1 new item in this menu)"
|
|
11
11
|
msgstr ""
|
|
12
12
|
|
|
@@ -47,7 +47,7 @@ msgstr ""
|
|
|
47
47
|
msgid "Are you sure?"
|
|
48
48
|
msgstr ""
|
|
49
49
|
|
|
50
|
-
#: src/entrypoints/admin/telepath/widgets.js:
|
|
50
|
+
#: src/entrypoints/admin/telepath/widgets.js:411
|
|
51
51
|
msgid "Blocks"
|
|
52
52
|
msgstr ""
|
|
53
53
|
|
|
@@ -70,6 +70,7 @@ msgstr ""
|
|
|
70
70
|
msgid "Character count:"
|
|
71
71
|
msgstr ""
|
|
72
72
|
|
|
73
|
+
#: src/components/Sidebar/menu/SubMenuCloseButton.tsx:30
|
|
73
74
|
#: src/entrypoints/admin/modal-workflow.js:56
|
|
74
75
|
msgid "Close"
|
|
75
76
|
msgstr ""
|
|
@@ -144,7 +145,7 @@ msgstr ""
|
|
|
144
145
|
msgid "Horizontal line"
|
|
145
146
|
msgstr ""
|
|
146
147
|
|
|
147
|
-
#: src/components/ComboBox/ComboBox.tsx:
|
|
148
|
+
#: src/components/ComboBox/ComboBox.tsx:10
|
|
148
149
|
msgid "Insert a block"
|
|
149
150
|
msgstr ""
|
|
150
151
|
|
|
@@ -168,7 +169,7 @@ msgstr ""
|
|
|
168
169
|
msgid "More actions"
|
|
169
170
|
msgstr ""
|
|
170
171
|
|
|
171
|
-
#: src/components/ComboBox/ComboBox.tsx:
|
|
172
|
+
#: src/components/ComboBox/ComboBox.tsx:12
|
|
172
173
|
#: src/components/Draftail/index.js:241
|
|
173
174
|
#: src/components/PageExplorer/PageExplorerPanel.tsx:84
|
|
174
175
|
msgid "No results"
|
|
@@ -191,6 +192,10 @@ msgstr ""
|
|
|
191
192
|
msgid "Pin toolbar"
|
|
192
193
|
msgstr ""
|
|
193
194
|
|
|
195
|
+
#: src/components/ComboBox/ComboBox.tsx:13
|
|
196
|
+
msgid "Preview"
|
|
197
|
+
msgstr ""
|
|
198
|
+
|
|
194
199
|
#: src/components/Draftail/EditorFallback/EditorFallback.js:96
|
|
195
200
|
msgid "Reload saved content"
|
|
196
201
|
msgstr ""
|
|
@@ -203,7 +208,7 @@ msgstr ""
|
|
|
203
208
|
msgid "Reply"
|
|
204
209
|
msgstr ""
|
|
205
210
|
|
|
206
|
-
#: src/includes/chooserModal.js:
|
|
211
|
+
#: src/includes/chooserModal.js:53
|
|
207
212
|
msgid "Report this error to your website administrator with the following information:"
|
|
208
213
|
msgstr ""
|
|
209
214
|
|
|
@@ -252,7 +257,7 @@ msgstr ""
|
|
|
252
257
|
msgid "Search"
|
|
253
258
|
msgstr ""
|
|
254
259
|
|
|
255
|
-
#: src/components/ComboBox/ComboBox.tsx:
|
|
260
|
+
#: src/components/ComboBox/ComboBox.tsx:11
|
|
256
261
|
msgid "Search options…"
|
|
257
262
|
msgstr ""
|
|
258
263
|
|
|
@@ -262,7 +267,7 @@ msgstr ""
|
|
|
262
267
|
|
|
263
268
|
#: src/components/Draftail/sources/ModalWorkflowSource.js:63
|
|
264
269
|
#: src/components/PageExplorer/PageExplorerPanel.tsx:112
|
|
265
|
-
#: src/includes/chooserModal.js:
|
|
270
|
+
#: src/includes/chooserModal.js:63
|
|
266
271
|
msgid "Server Error"
|
|
267
272
|
msgstr ""
|
|
268
273
|
|
|
@@ -274,7 +279,7 @@ msgstr ""
|
|
|
274
279
|
msgid "Show latest content"
|
|
275
280
|
msgstr ""
|
|
276
281
|
|
|
277
|
-
#: src/entrypoints/admin/telepath/widgets.js:
|
|
282
|
+
#: src/entrypoints/admin/telepath/widgets.js:303
|
|
278
283
|
msgid "Split block"
|
|
279
284
|
msgstr ""
|
|
280
285
|
|
|
@@ -282,19 +287,19 @@ msgstr ""
|
|
|
282
287
|
msgid "The editor just crashed. Content has been reset to the last saved version."
|
|
283
288
|
msgstr ""
|
|
284
289
|
|
|
285
|
-
#: src/components/StreamField/blocks/ListBlock.js:
|
|
286
|
-
#: src/components/StreamField/blocks/StreamBlock.js:
|
|
287
|
-
#: src/components/StreamField/blocks/StreamBlock.js:
|
|
290
|
+
#: src/components/StreamField/blocks/ListBlock.js:202
|
|
291
|
+
#: src/components/StreamField/blocks/StreamBlock.js:277
|
|
292
|
+
#: src/components/StreamField/blocks/StreamBlock.js:301
|
|
288
293
|
msgid "The maximum number of items is %(max_num)d"
|
|
289
294
|
msgstr ""
|
|
290
295
|
|
|
291
|
-
#: src/components/StreamField/blocks/ListBlock.js:
|
|
292
|
-
#: src/components/StreamField/blocks/StreamBlock.js:
|
|
293
|
-
#: src/components/StreamField/blocks/StreamBlock.js:
|
|
296
|
+
#: src/components/StreamField/blocks/ListBlock.js:213
|
|
297
|
+
#: src/components/StreamField/blocks/StreamBlock.js:285
|
|
298
|
+
#: src/components/StreamField/blocks/StreamBlock.js:315
|
|
294
299
|
msgid "The minimum number of items is %(min_num)d"
|
|
295
300
|
msgstr ""
|
|
296
301
|
|
|
297
|
-
#: src/includes/chooserModal.js:
|
|
302
|
+
#: src/includes/chooserModal.js:23
|
|
298
303
|
msgid "This field is required."
|
|
299
304
|
msgstr ""
|
|
300
305
|
|
wagtail/admin/menu.py
CHANGED
|
@@ -43,9 +43,6 @@ class MenuItem(metaclass=MediaDefiningClass):
|
|
|
43
43
|
"""
|
|
44
44
|
return True
|
|
45
45
|
|
|
46
|
-
def is_active(self, request):
|
|
47
|
-
return request.path.startswith(str(self.url))
|
|
48
|
-
|
|
49
46
|
def render_component(self, request):
|
|
50
47
|
return LinkMenuItemComponent(
|
|
51
48
|
self.name,
|
|
@@ -121,13 +118,6 @@ class Menu:
|
|
|
121
118
|
|
|
122
119
|
return items
|
|
123
120
|
|
|
124
|
-
def active_menu_items(self, request):
|
|
125
|
-
return [
|
|
126
|
-
item
|
|
127
|
-
for item in self.menu_items_for_request(request)
|
|
128
|
-
if item.is_active(request)
|
|
129
|
-
]
|
|
130
|
-
|
|
131
121
|
@property
|
|
132
122
|
def media(self):
|
|
133
123
|
media = Media()
|
|
@@ -154,9 +144,6 @@ class SubmenuMenuItem(MenuItem):
|
|
|
154
144
|
# show the submenu if one or more of its children is shown
|
|
155
145
|
return bool(self.menu.menu_items_for_request(request))
|
|
156
146
|
|
|
157
|
-
def is_active(self, request):
|
|
158
|
-
return bool(self.menu.active_menu_items(request))
|
|
159
|
-
|
|
160
147
|
def render_component(self, request):
|
|
161
148
|
return SubMenuItemComponent(
|
|
162
149
|
self.name,
|
wagtail/admin/panels/base.py
CHANGED
|
@@ -57,8 +57,8 @@ class Panel:
|
|
|
57
57
|
with the field list and other parameters collated from all panels in the structure.
|
|
58
58
|
It then handles rendering that form as HTML.
|
|
59
59
|
|
|
60
|
-
The following parameters can be used to
|
|
61
|
-
For more details, see :ref:`
|
|
60
|
+
The following parameters can be used to customize how the panel is displayed.
|
|
61
|
+
For more details, see :ref:`customizing_panels`.
|
|
62
62
|
|
|
63
63
|
:param heading: The heading text to display for the panel.
|
|
64
64
|
:param classname: A CSS class name to add to the panel's HTML element.
|
wagtail/admin/panels/group.py
CHANGED
|
@@ -71,7 +71,10 @@ class PanelGroup(Panel):
|
|
|
71
71
|
return options
|
|
72
72
|
|
|
73
73
|
def on_model_bound(self):
|
|
74
|
-
|
|
74
|
+
from .model_utils import expand_panel_list
|
|
75
|
+
|
|
76
|
+
child_panels = expand_panel_list(self.model, self.children)
|
|
77
|
+
self.children = [child.bind_to_model(self.model) for child in child_panels]
|
|
75
78
|
|
|
76
79
|
@cached_property
|
|
77
80
|
def child_identifiers(self):
|
|
@@ -3,6 +3,7 @@ import functools
|
|
|
3
3
|
from django import forms
|
|
4
4
|
from django.forms.formsets import DELETION_FIELD_NAME, ORDERING_FIELD_NAME
|
|
5
5
|
from django.utils.functional import cached_property
|
|
6
|
+
from django.utils.text import capfirst
|
|
6
7
|
|
|
7
8
|
from wagtail.admin import compare
|
|
8
9
|
|
|
@@ -26,7 +27,7 @@ class InlinePanel(Panel):
|
|
|
26
27
|
super().__init__(*args, **kwargs)
|
|
27
28
|
self.relation_name = relation_name
|
|
28
29
|
self.panels = panels
|
|
29
|
-
self.heading = heading or label
|
|
30
|
+
self.heading = heading or label or capfirst(relation_name.replace("_", " "))
|
|
30
31
|
self.label = label
|
|
31
32
|
self.min_num = min_num
|
|
32
33
|
self.max_num = max_num
|
|
@@ -77,6 +78,8 @@ class InlinePanel(Panel):
|
|
|
77
78
|
def on_model_bound(self):
|
|
78
79
|
manager = getattr(self.model, self.relation_name)
|
|
79
80
|
self.db_field = manager.rel
|
|
81
|
+
if not self.label:
|
|
82
|
+
self.label = capfirst(self.db_field.related_model._meta.verbose_name)
|
|
80
83
|
|
|
81
84
|
def classes(self):
|
|
82
85
|
return super().classes() + ["w-panel--nested"]
|
|
@@ -150,7 +153,7 @@ class InlinePanel(Panel):
|
|
|
150
153
|
compare.ChildRelationComparison,
|
|
151
154
|
self.panel.db_field,
|
|
152
155
|
field_comparisons,
|
|
153
|
-
label=self.
|
|
156
|
+
label=self.heading,
|
|
154
157
|
)
|
|
155
158
|
]
|
|
156
159
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import functools
|
|
2
2
|
|
|
3
|
+
from django.core.exceptions import ImproperlyConfigured
|
|
4
|
+
from django.db.models.fields.reverse_related import ManyToOneRel
|
|
3
5
|
from django.forms.models import fields_for_model
|
|
4
6
|
|
|
5
7
|
from wagtail.admin.forms.models import formfield_for_dbfield
|
|
8
|
+
from wagtail.models import PanelPlaceholder
|
|
6
9
|
|
|
10
|
+
from .base import Panel
|
|
7
11
|
from .field_panel import FieldPanel
|
|
8
12
|
from .group import ObjectList
|
|
9
13
|
|
|
@@ -47,3 +51,35 @@ def get_edit_handler(model):
|
|
|
47
51
|
panel = ObjectList(panels)
|
|
48
52
|
|
|
49
53
|
return panel.bind_to_model(model)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def expand_panel_list(model, panels):
|
|
57
|
+
"""
|
|
58
|
+
Given a list which may be a mixture of Panel instances and strings (representing field/relation names),
|
|
59
|
+
expand it into a flat list of Panel instances
|
|
60
|
+
"""
|
|
61
|
+
result = []
|
|
62
|
+
for panel in panels:
|
|
63
|
+
if isinstance(panel, Panel):
|
|
64
|
+
result.append(panel)
|
|
65
|
+
|
|
66
|
+
elif isinstance(panel, PanelPlaceholder):
|
|
67
|
+
if real_panel := panel.construct():
|
|
68
|
+
result.append(real_panel)
|
|
69
|
+
|
|
70
|
+
elif isinstance(panel, str):
|
|
71
|
+
field = model._meta.get_field(panel)
|
|
72
|
+
if isinstance(field, ManyToOneRel):
|
|
73
|
+
from .inline_panel import InlinePanel
|
|
74
|
+
|
|
75
|
+
result.append(InlinePanel(panel))
|
|
76
|
+
else:
|
|
77
|
+
result.append(FieldPanel(panel))
|
|
78
|
+
|
|
79
|
+
else:
|
|
80
|
+
raise ImproperlyConfigured(
|
|
81
|
+
"Invalid panel definition %r - expected Panel or string, got %r"
|
|
82
|
+
% (panel, type(panel))
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return result
|
|
@@ -1,50 +1,12 @@
|
|
|
1
|
-
from django.conf import settings
|
|
2
1
|
from django.utils.translation import gettext_lazy
|
|
3
2
|
|
|
4
3
|
from wagtail.admin.forms.pages import WagtailAdminPageForm
|
|
5
4
|
from wagtail.models import Page
|
|
6
5
|
from wagtail.utils.decorators import cached_classmethod
|
|
7
6
|
|
|
8
|
-
from .
|
|
9
|
-
from .field_panel import FieldPanel
|
|
10
|
-
from .group import MultiFieldPanel, ObjectList, TabbedInterface
|
|
11
|
-
from .publishing_panel import PublishingPanel
|
|
12
|
-
from .title_field_panel import TitleFieldPanel
|
|
7
|
+
from .group import ObjectList, TabbedInterface
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
def set_default_page_edit_handlers(cls):
|
|
16
|
-
cls.content_panels = [
|
|
17
|
-
TitleFieldPanel("title"),
|
|
18
|
-
]
|
|
19
|
-
|
|
20
|
-
cls.promote_panels = [
|
|
21
|
-
MultiFieldPanel(
|
|
22
|
-
[
|
|
23
|
-
FieldPanel("slug"),
|
|
24
|
-
FieldPanel("seo_title"),
|
|
25
|
-
FieldPanel("search_description"),
|
|
26
|
-
],
|
|
27
|
-
gettext_lazy("For search engines"),
|
|
28
|
-
),
|
|
29
|
-
MultiFieldPanel(
|
|
30
|
-
[
|
|
31
|
-
FieldPanel("show_in_menus"),
|
|
32
|
-
],
|
|
33
|
-
gettext_lazy("For site menus"),
|
|
34
|
-
),
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
cls.settings_panels = [
|
|
38
|
-
PublishingPanel(),
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
if getattr(settings, "WAGTAILADMIN_COMMENTS_ENABLED", True):
|
|
42
|
-
cls.settings_panels.append(CommentPanel())
|
|
43
|
-
|
|
44
|
-
cls.base_form_class = WagtailAdminPageForm
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
set_default_page_edit_handlers(Page)
|
|
9
|
+
Page.base_form_class = WagtailAdminPageForm
|
|
48
10
|
|
|
49
11
|
|
|
50
12
|
@cached_classmethod
|
|
@@ -5,7 +5,6 @@ from django.dispatch import receiver
|
|
|
5
5
|
from wagtail.models import Page
|
|
6
6
|
|
|
7
7
|
from .model_utils import get_edit_handler
|
|
8
|
-
from .page_utils import set_default_page_edit_handlers
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
@receiver(setting_changed)
|
|
@@ -14,7 +13,6 @@ def reset_edit_handler_cache(**kwargs):
|
|
|
14
13
|
Clear page edit handler cache when global WAGTAILADMIN_COMMENTS_ENABLED settings are changed
|
|
15
14
|
"""
|
|
16
15
|
if kwargs["setting"] == "WAGTAILADMIN_COMMENTS_ENABLED":
|
|
17
|
-
set_default_page_edit_handlers(Page)
|
|
18
16
|
for model in apps.get_models():
|
|
19
17
|
if issubclass(model, Page):
|
|
20
18
|
model.get_edit_handler.cache_clear()
|