wagtail 6.3.1__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/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +5 -5
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +29 -0
- 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/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +4 -4
- wagtail/contrib/forms/tests/test_models.py +7 -5
- wagtail/contrib/forms/tests/test_views.py +75 -0
- wagtail/contrib/frontend_cache/backends/cloudfront.py +1 -1
- wagtail/contrib/frontend_cache/tasks.py +83 -0
- wagtail/contrib/frontend_cache/tests.py +48 -33
- 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 +14 -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 +34 -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/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/sv/LC_MESSAGES/django.po +4 -3
- 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/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/nl/LC_MESSAGES/django.po +4 -3
- 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.1.dist-info → wagtail-6.4rc1.dist-info}/METADATA +2 -2
- {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/RECORD +300 -287
- 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.1.dist-info → wagtail-6.4rc1.dist-info}/LICENSE +0 -0
- {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/WHEEL +0 -0
- {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/entry_points.txt +0 -0
- {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ msgid ""
|
|
|
8
8
|
msgstr ""
|
|
9
9
|
"Project-Id-Version: PACKAGE VERSION\n"
|
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date:
|
|
11
|
+
"POT-Creation-Date: 2025-01-20 17:59+0000\n"
|
|
12
12
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
@@ -22,7 +22,7 @@ msgstr ""
|
|
|
22
22
|
msgid "Wagtail redirects"
|
|
23
23
|
msgstr ""
|
|
24
24
|
|
|
25
|
-
#: filters.py:12 views.py:
|
|
25
|
+
#: filters.py:12 views.py:100 views.py:117
|
|
26
26
|
msgid "Type"
|
|
27
27
|
msgstr ""
|
|
28
28
|
|
|
@@ -123,19 +123,14 @@ msgstr ""
|
|
|
123
123
|
msgid "redirects"
|
|
124
124
|
msgstr ""
|
|
125
125
|
|
|
126
|
-
#: templates/wagtailredirects/
|
|
127
|
-
#: views.py:70
|
|
128
|
-
msgid "Add redirect"
|
|
129
|
-
msgstr ""
|
|
130
|
-
|
|
131
|
-
#: templates/wagtailredirects/choose_import_file.html:3 views.py:79
|
|
126
|
+
#: templates/wagtailredirects/choose_import_file.html:3 views.py:77
|
|
132
127
|
#: wagtail_hooks.py:34
|
|
133
128
|
msgid "Redirects"
|
|
134
129
|
msgstr ""
|
|
135
130
|
|
|
136
131
|
#: templates/wagtailredirects/choose_import_file.html:6
|
|
137
132
|
#: templates/wagtailredirects/confirm_import.html:6
|
|
138
|
-
#: templates/wagtailredirects/import_summary.html:5 views.py:
|
|
133
|
+
#: templates/wagtailredirects/import_summary.html:5 views.py:128
|
|
139
134
|
msgid "Import redirects"
|
|
140
135
|
msgstr ""
|
|
141
136
|
|
|
@@ -157,17 +152,9 @@ msgid "Delete redirect %(title)s"
|
|
|
157
152
|
msgstr ""
|
|
158
153
|
|
|
159
154
|
#: templates/wagtailredirects/confirm_delete.html:5
|
|
160
|
-
msgid "Delete"
|
|
161
|
-
msgstr ""
|
|
162
|
-
|
|
163
|
-
#: templates/wagtailredirects/confirm_delete.html:9
|
|
164
155
|
msgid "Are you sure you want to delete this redirect?"
|
|
165
156
|
msgstr ""
|
|
166
157
|
|
|
167
|
-
#: templates/wagtailredirects/confirm_delete.html:12
|
|
168
|
-
msgid "Yes, delete"
|
|
169
|
-
msgstr ""
|
|
170
|
-
|
|
171
158
|
#: templates/wagtailredirects/confirm_import.html:4
|
|
172
159
|
#: templates/wagtailredirects/confirm_import.html:7
|
|
173
160
|
msgid "Confirm import"
|
|
@@ -196,11 +183,11 @@ msgid ""
|
|
|
196
183
|
"Found %(total)s redirects, created %(successes)s and found %(errors)s errors."
|
|
197
184
|
msgstr ""
|
|
198
185
|
|
|
199
|
-
#: templates/wagtailredirects/import_summary.html:17 views.py:
|
|
186
|
+
#: templates/wagtailredirects/import_summary.html:17 views.py:82 views.py:114
|
|
200
187
|
msgid "From"
|
|
201
188
|
msgstr ""
|
|
202
189
|
|
|
203
|
-
#: templates/wagtailredirects/import_summary.html:18 views.py:
|
|
190
|
+
#: templates/wagtailredirects/import_summary.html:18 views.py:94 views.py:116
|
|
204
191
|
msgid "To"
|
|
205
192
|
msgstr ""
|
|
206
193
|
|
|
@@ -224,57 +211,57 @@ msgid ""
|
|
|
224
211
|
"href=\"%(wagtailredirects_add_redirect_url)s\">add one</a>?"
|
|
225
212
|
msgstr ""
|
|
226
213
|
|
|
227
|
-
#: views.py:
|
|
214
|
+
#: views.py:68
|
|
215
|
+
msgid "Add redirect"
|
|
216
|
+
msgstr ""
|
|
217
|
+
|
|
218
|
+
#: views.py:88 views.py:115
|
|
228
219
|
msgid "Site"
|
|
229
220
|
msgstr ""
|
|
230
221
|
|
|
231
|
-
#: views.py:
|
|
222
|
+
#: views.py:146
|
|
232
223
|
msgid "The redirect could not be saved due to errors."
|
|
233
224
|
msgstr ""
|
|
234
225
|
|
|
235
|
-
#: views.py:
|
|
226
|
+
#: views.py:150
|
|
236
227
|
#, python-format
|
|
237
228
|
msgid "Redirect '%(redirect_title)s' updated."
|
|
238
229
|
msgstr ""
|
|
239
230
|
|
|
240
|
-
#: views.py:
|
|
231
|
+
#: views.py:183
|
|
241
232
|
#, python-format
|
|
242
233
|
msgid "Redirect '%(redirect_title)s' deleted."
|
|
243
234
|
msgstr ""
|
|
244
235
|
|
|
245
|
-
#: views.py:
|
|
246
|
-
|
|
247
|
-
msgid "Redirect '%(redirect_title)s' added."
|
|
248
|
-
msgstr ""
|
|
249
|
-
|
|
250
|
-
#: views.py:222
|
|
251
|
-
msgid "Edit"
|
|
236
|
+
#: views.py:196
|
|
237
|
+
msgid "The redirect could not be created due to errors."
|
|
252
238
|
msgstr ""
|
|
253
239
|
|
|
254
|
-
#: views.py:
|
|
255
|
-
|
|
240
|
+
#: views.py:200
|
|
241
|
+
#, python-format
|
|
242
|
+
msgid "Redirect '%(redirect_title)s' added."
|
|
256
243
|
msgstr ""
|
|
257
244
|
|
|
258
|
-
#: views.py:
|
|
245
|
+
#: views.py:235
|
|
259
246
|
msgid "Search redirects"
|
|
260
247
|
msgstr ""
|
|
261
248
|
|
|
262
|
-
#: views.py:
|
|
249
|
+
#: views.py:249
|
|
263
250
|
#, python-format
|
|
264
251
|
msgid "File format of type \"%(extension)s\" is not supported"
|
|
265
252
|
msgstr ""
|
|
266
253
|
|
|
267
|
-
#: views.py:
|
|
254
|
+
#: views.py:266
|
|
268
255
|
#, python-format
|
|
269
256
|
msgid "Imported file has a wrong encoding: %(error_message)s"
|
|
270
257
|
msgstr ""
|
|
271
258
|
|
|
272
|
-
#: views.py:
|
|
259
|
+
#: views.py:273
|
|
273
260
|
#, python-format
|
|
274
261
|
msgid "%(error)s encountered while trying to read file: %(filename)s"
|
|
275
262
|
msgstr ""
|
|
276
263
|
|
|
277
|
-
#: views.py:
|
|
264
|
+
#: views.py:364
|
|
278
265
|
#, python-format
|
|
279
266
|
msgid "Imported %(total)d redirect"
|
|
280
267
|
msgid_plural "Imported %(total)d redirects"
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
{% extends "wagtailadmin/generic/
|
|
2
|
-
{% load i18n wagtailadmin_tags %}
|
|
3
|
-
{% block titletag %}{% trans "Add redirect" %}{% endblock %}
|
|
4
|
-
{% block content %}
|
|
5
|
-
{% trans "Add redirect" as add_red_str %}
|
|
6
|
-
{% include "wagtailadmin/shared/header.html" with title=add_red_str icon="redirect" %}
|
|
7
|
-
|
|
8
|
-
{% include "wagtailadmin/shared/non_field_errors.html" %}
|
|
9
|
-
|
|
10
|
-
<form action="{% url 'wagtailredirects:add' %}" method="POST" class="nice-padding" novalidate>
|
|
11
|
-
{% csrf_token %}
|
|
12
|
-
|
|
13
|
-
<ul class="fields">
|
|
14
|
-
{% for field in form.visible_fields %}
|
|
15
|
-
<li>{% formattedfield field %}</li>
|
|
16
|
-
{% endfor %}
|
|
17
|
-
</ul>
|
|
18
|
-
|
|
19
|
-
{% block footer %}
|
|
20
|
-
{{ block.super }}
|
|
21
|
-
{% endblock %}
|
|
22
|
-
</form>
|
|
23
|
-
|
|
24
|
-
{% endblock %}
|
|
1
|
+
{% extends "wagtailadmin/generic/create.html" %}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
{% extends "wagtailadmin/
|
|
1
|
+
{% extends "wagtailadmin/generic/confirm_delete.html" %}
|
|
2
2
|
{% load i18n %}
|
|
3
3
|
{% block titletag %}{% blocktrans trimmed with title=redirect.title %}Delete redirect {{ title }}{% endblocktrans %}{% endblock %}
|
|
4
|
-
{% block
|
|
5
|
-
{% trans "
|
|
6
|
-
{% include "wagtailadmin/shared/header.html" with title=delete_str subtitle=redirect.title icon="redirect" %}
|
|
7
|
-
|
|
8
|
-
<div class="row row-flush nice-padding">
|
|
9
|
-
<p>{% trans "Are you sure you want to delete this redirect?" %}</p>
|
|
10
|
-
<form action="{% url 'wagtailredirects:delete' redirect.id %}" method="POST">
|
|
11
|
-
{% csrf_token %}
|
|
12
|
-
<input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
|
|
13
|
-
</form>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
4
|
+
{% block confirmation_message %}
|
|
5
|
+
<p>{% trans "Are you sure you want to delete this redirect?" %}</p>
|
|
16
6
|
{% endblock %}
|
|
@@ -801,14 +801,15 @@ class TestRedirectsAddView(WagtailTestUtils, TestCase):
|
|
|
801
801
|
self.assertTemplateUsed(response, "wagtailredirects/add.html")
|
|
802
802
|
|
|
803
803
|
def test_add(self):
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
804
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
805
|
+
response = self.post(
|
|
806
|
+
{
|
|
807
|
+
"old_path": "/test",
|
|
808
|
+
"site": "",
|
|
809
|
+
"is_permanent": "on",
|
|
810
|
+
"redirect_link": "http://www.test.com/",
|
|
811
|
+
}
|
|
812
|
+
)
|
|
812
813
|
|
|
813
814
|
# Should redirect back to index
|
|
814
815
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|
|
@@ -827,15 +828,16 @@ class TestRedirectsAddView(WagtailTestUtils, TestCase):
|
|
|
827
828
|
self.assertEqual(PURGED_URLS, {"http://localhost/test"})
|
|
828
829
|
|
|
829
830
|
def test_add_with_site(self):
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
831
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
832
|
+
localhost = Site.objects.get(hostname="localhost")
|
|
833
|
+
response = self.post(
|
|
834
|
+
{
|
|
835
|
+
"old_path": "/test",
|
|
836
|
+
"site": localhost.id,
|
|
837
|
+
"is_permanent": "on",
|
|
838
|
+
"redirect_link": "http://www.test.com/",
|
|
839
|
+
}
|
|
840
|
+
)
|
|
839
841
|
|
|
840
842
|
# Should redirect back to index
|
|
841
843
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|
|
@@ -849,72 +851,76 @@ class TestRedirectsAddView(WagtailTestUtils, TestCase):
|
|
|
849
851
|
self.assertEqual(PURGED_URLS, {"http://localhost/test"})
|
|
850
852
|
|
|
851
853
|
def test_add_validation_error(self):
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
854
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
855
|
+
response = self.post(
|
|
856
|
+
{
|
|
857
|
+
"old_path": "",
|
|
858
|
+
"site": "",
|
|
859
|
+
"is_permanent": "on",
|
|
860
|
+
"redirect_link": "http://www.test.com/",
|
|
861
|
+
}
|
|
862
|
+
)
|
|
860
863
|
|
|
861
864
|
# Should not redirect to index
|
|
862
865
|
self.assertEqual(response.status_code, 200)
|
|
863
866
|
self.assertEqual(PURGED_URLS, set())
|
|
864
867
|
|
|
865
868
|
def test_cannot_add_duplicate_with_no_site(self):
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
869
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
870
|
+
models.Redirect.objects.create(
|
|
871
|
+
old_path="/test", site=None, redirect_link="http://elsewhere.com/"
|
|
872
|
+
)
|
|
873
|
+
response = self.post(
|
|
874
|
+
{
|
|
875
|
+
"old_path": "/test",
|
|
876
|
+
"site": "",
|
|
877
|
+
"is_permanent": "on",
|
|
878
|
+
"redirect_link": "http://www.test.com/",
|
|
879
|
+
}
|
|
880
|
+
)
|
|
877
881
|
|
|
878
882
|
# Should not redirect to index
|
|
879
883
|
self.assertEqual(response.status_code, 200)
|
|
880
884
|
self.assertEqual(PURGED_URLS, set())
|
|
881
885
|
|
|
882
886
|
def test_cannot_add_duplicate_on_same_site(self):
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
887
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
888
|
+
localhost = Site.objects.get(hostname="localhost")
|
|
889
|
+
models.Redirect.objects.create(
|
|
890
|
+
old_path="/test", site=localhost, redirect_link="http://elsewhere.com/"
|
|
891
|
+
)
|
|
892
|
+
response = self.post(
|
|
893
|
+
{
|
|
894
|
+
"old_path": "/test",
|
|
895
|
+
"site": localhost.pk,
|
|
896
|
+
"is_permanent": "on",
|
|
897
|
+
"redirect_link": "http://www.test.com/",
|
|
898
|
+
}
|
|
899
|
+
)
|
|
895
900
|
|
|
896
901
|
# Should not redirect to index
|
|
897
902
|
self.assertEqual(response.status_code, 200)
|
|
898
903
|
self.assertEqual(PURGED_URLS, set())
|
|
899
904
|
|
|
900
905
|
def test_can_reuse_path_on_other_site(self):
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
907
|
+
localhost = Site.objects.get(hostname="localhost")
|
|
908
|
+
contact_page = Page.objects.get(url_path="/home/contact-us/")
|
|
909
|
+
other_site = Site.objects.create(
|
|
910
|
+
hostname="other.example.com", port=80, root_page=contact_page
|
|
911
|
+
)
|
|
906
912
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
913
|
+
models.Redirect.objects.create(
|
|
914
|
+
old_path="/test", site=localhost, redirect_link="http://elsewhere.com/"
|
|
915
|
+
)
|
|
916
|
+
response = self.post(
|
|
917
|
+
{
|
|
918
|
+
"old_path": "/test",
|
|
919
|
+
"site": other_site.pk,
|
|
920
|
+
"is_permanent": "on",
|
|
921
|
+
"redirect_link": "http://www.test.com/",
|
|
922
|
+
}
|
|
923
|
+
)
|
|
918
924
|
|
|
919
925
|
# Should redirect back to index
|
|
920
926
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|
|
@@ -926,14 +932,15 @@ class TestRedirectsAddView(WagtailTestUtils, TestCase):
|
|
|
926
932
|
self.assertEqual(PURGED_URLS, redirects.get().old_links())
|
|
927
933
|
|
|
928
934
|
def test_add_long_redirect(self):
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
935
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
936
|
+
response = self.post(
|
|
937
|
+
{
|
|
938
|
+
"old_path": "/test",
|
|
939
|
+
"site": "",
|
|
940
|
+
"is_permanent": "on",
|
|
941
|
+
"redirect_link": "https://www.google.com/search?q=this+is+a+very+long+url+because+it+has+a+huge+search+term+appended+to+the+end+of+it+even+though+someone+should+really+not+be+doing+something+so+crazy+without+first+seeing+a+psychiatrist",
|
|
942
|
+
}
|
|
943
|
+
)
|
|
937
944
|
|
|
938
945
|
# Should redirect back to index
|
|
939
946
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|
|
@@ -1002,14 +1009,15 @@ class TestRedirectsEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1002
1009
|
self.assertEqual(self.get(redirect_id=100000).status_code, 404)
|
|
1003
1010
|
|
|
1004
1011
|
def test_edit(self):
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1012
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
1013
|
+
response = self.post(
|
|
1014
|
+
{
|
|
1015
|
+
"old_path": "/test",
|
|
1016
|
+
"is_permanent": "on",
|
|
1017
|
+
"site": "",
|
|
1018
|
+
"redirect_link": "http://www.test.com/ive-been-edited",
|
|
1019
|
+
}
|
|
1020
|
+
)
|
|
1013
1021
|
|
|
1014
1022
|
# Should redirect back to index
|
|
1015
1023
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|
|
@@ -1025,16 +1033,17 @@ class TestRedirectsEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1025
1033
|
self.assertEqual(PURGED_URLS, {"http://localhost/test"})
|
|
1026
1034
|
|
|
1027
1035
|
def test_edit_with_site(self):
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1036
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
1037
|
+
localhost = Site.objects.get(hostname="localhost")
|
|
1038
|
+
|
|
1039
|
+
response = self.post(
|
|
1040
|
+
{
|
|
1041
|
+
"old_path": "/test",
|
|
1042
|
+
"is_permanent": "on",
|
|
1043
|
+
"site": localhost.id,
|
|
1044
|
+
"redirect_link": "http://www.test.com/ive-been-edited",
|
|
1045
|
+
}
|
|
1046
|
+
)
|
|
1038
1047
|
|
|
1039
1048
|
# Should redirect back to index
|
|
1040
1049
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|
|
@@ -1049,31 +1058,33 @@ class TestRedirectsEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1049
1058
|
self.assertEqual(PURGED_URLS, {"http://localhost/test"})
|
|
1050
1059
|
|
|
1051
1060
|
def test_edit_validation_error(self):
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1061
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
1062
|
+
response = self.post(
|
|
1063
|
+
{
|
|
1064
|
+
"old_path": "",
|
|
1065
|
+
"is_permanent": "on",
|
|
1066
|
+
"site": "",
|
|
1067
|
+
"redirect_link": "http://www.test.com/ive-been-edited",
|
|
1068
|
+
}
|
|
1069
|
+
)
|
|
1060
1070
|
|
|
1061
1071
|
# Should not redirect to index
|
|
1062
1072
|
self.assertEqual(response.status_code, 200)
|
|
1063
1073
|
self.assertEqual(PURGED_URLS, set())
|
|
1064
1074
|
|
|
1065
1075
|
def test_edit_duplicate(self):
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1076
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
1077
|
+
models.Redirect.objects.create(
|
|
1078
|
+
old_path="/othertest", site=None, redirect_link="http://elsewhere.com/"
|
|
1079
|
+
)
|
|
1080
|
+
response = self.post(
|
|
1081
|
+
{
|
|
1082
|
+
"old_path": "/othertest",
|
|
1083
|
+
"is_permanent": "on",
|
|
1084
|
+
"site": "",
|
|
1085
|
+
"redirect_link": "http://www.test.com/ive-been-edited",
|
|
1086
|
+
}
|
|
1087
|
+
)
|
|
1077
1088
|
|
|
1078
1089
|
# Should not redirect to index
|
|
1079
1090
|
self.assertEqual(response.status_code, 200)
|
|
@@ -1153,7 +1164,8 @@ class TestRedirectsDeleteView(WagtailTestUtils, TestCase):
|
|
|
1153
1164
|
self.assertEqual(self.get(redirect_id=100000).status_code, 404)
|
|
1154
1165
|
|
|
1155
1166
|
def test_delete(self):
|
|
1156
|
-
|
|
1167
|
+
with self.captureOnCommitCallbacks(execute=True):
|
|
1168
|
+
response = self.post()
|
|
1157
1169
|
|
|
1158
1170
|
# Should redirect back to index
|
|
1159
1171
|
self.assertRedirects(response, reverse("wagtailredirects:index"))
|