wagtail 6.2.2__py3-none-any.whl → 6.3rc2__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/copy_for_translation.py +6 -0
- wagtail/actions/publish_revision.py +3 -3
- wagtail/admin/action_menu.py +5 -3
- wagtail/admin/forms/account.py +1 -1
- wagtail/admin/icons.py +2 -6
- wagtail/admin/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/cy/LC_MESSAGES/django.po +32 -0
- wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/dv/LC_MESSAGES/django.po +28 -0
- wagtail/admin/locale/en/LC_MESSAGES/django.po +451 -485
- wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +7 -7
- wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sl/LC_MESSAGES/django.po +150 -0
- wagtail/admin/locale/sl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/sl/LC_MESSAGES/djangojs.po +9 -2
- wagtail/admin/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ug/LC_MESSAGES/django.po +3250 -196
- wagtail/admin/localization.py +12 -2
- wagtail/admin/panels/model_utils.py +1 -1
- wagtail/admin/site_summary.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/images/email-header.jpg +0 -0
- wagtail/admin/static/wagtailadmin/js/bulk-actions.js +1 -1
- wagtail/admin/static/wagtailadmin/js/core.js +1 -1
- wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt +12 -0
- wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
- wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/widgets.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/wagtailadmin.js +1 -1
- wagtail/admin/static/wagtailadmin/js/workflow-action.js +1 -1
- wagtail/admin/staticfiles.py +6 -4
- wagtail/admin/templates/wagtailadmin/account/account.html +42 -59
- wagtail/admin/templates/wagtailadmin/admin_base.html +0 -28
- wagtail/admin/templates/wagtailadmin/bulk_actions/footer.html +1 -1
- wagtail/admin/templates/wagtailadmin/chooser/_search_results.html +7 -5
- wagtail/admin/templates/wagtailadmin/chooser/tables/page_navigate_to_children_cell.html +1 -1
- wagtail/admin/templates/wagtailadmin/generic/chooser/results.html +7 -5
- wagtail/admin/templates/wagtailadmin/generic/edit.html +0 -8
- wagtail/admin/templates/wagtailadmin/generic/form.html +60 -17
- wagtail/admin/templates/wagtailadmin/generic/index.html +17 -0
- wagtail/admin/templates/wagtailadmin/generic/index_results.html +9 -35
- wagtail/admin/templates/wagtailadmin/generic/inspect.html +2 -21
- wagtail/admin/templates/wagtailadmin/generic/listing.html +11 -17
- wagtail/admin/templates/wagtailadmin/generic/listing_results.html +19 -1
- wagtail/admin/templates/wagtailadmin/home/account_summary.html +26 -0
- wagtail/admin/templates/wagtailadmin/home/locked_pages.html +28 -18
- wagtail/admin/templates/wagtailadmin/home/recent_edits.html +28 -17
- wagtail/admin/templates/wagtailadmin/home/site_summary_pages.html +2 -2
- wagtail/admin/templates/wagtailadmin/home/upgrade_notification.html +35 -13
- wagtail/admin/templates/wagtailadmin/home/user_objects_in_workflow_moderation.html +28 -18
- wagtail/admin/templates/wagtailadmin/home/workflow_objects_to_moderate.html +43 -32
- wagtail/admin/templates/wagtailadmin/home.html +22 -5
- wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +0 -1
- wagtail/admin/templates/wagtailadmin/pages/action_menu/menu.html +1 -11
- wagtail/admin/templates/wagtailadmin/pages/action_menu/menu_item.html +1 -6
- wagtail/admin/templates/wagtailadmin/pages/action_menu/page_locked.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/action_menu/publish.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/action_menu/save_draft.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_delete.html +12 -6
- wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_move.html +12 -7
- wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_publish.html +17 -11
- wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_unpublish.html +15 -9
- wagtail/admin/templates/wagtailadmin/pages/confirm_delete.html +9 -9
- wagtail/admin/templates/wagtailadmin/pages/confirm_move.html +2 -2
- wagtail/admin/templates/wagtailadmin/pages/confirm_unpublish.html +4 -4
- wagtail/admin/templates/wagtailadmin/pages/create.html +15 -34
- wagtail/admin/templates/wagtailadmin/pages/edit.html +15 -30
- wagtail/admin/templates/wagtailadmin/pages/explorable_index.html +6 -0
- wagtail/admin/templates/wagtailadmin/pages/explorable_index_results.html +60 -0
- wagtail/admin/templates/wagtailadmin/pages/index.html +1 -36
- wagtail/admin/templates/wagtailadmin/pages/index_results.html +2 -50
- wagtail/admin/templates/wagtailadmin/pages/listing/_locked_indicator.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/listing/_ordering_cell.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/listing/_page_header_buttons.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/listing/_page_title_column_header.html +3 -3
- wagtail/admin/templates/wagtailadmin/pages/listing/_pagination.html +1 -1
- wagtail/admin/templates/wagtailadmin/pages/listing.html +24 -0
- wagtail/admin/templates/wagtailadmin/pages/search.html +1 -20
- wagtail/admin/templates/wagtailadmin/pages/search_results.html +27 -25
- wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_formset.html +0 -1
- wagtail/admin/templates/wagtailadmin/reports/listing/_list_page_report.html +2 -2
- wagtail/admin/templates/wagtailadmin/reports/listing/_list_page_types_usage.html +6 -6
- wagtail/admin/templates/wagtailadmin/reports/workflow_tasks_results.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/action_menu/menu.html +14 -0
- wagtail/admin/templates/wagtailadmin/shared/action_menu/menu_item.html +6 -0
- wagtail/admin/templates/wagtailadmin/shared/avatar.html +13 -3
- wagtail/admin/templates/wagtailadmin/shared/header.html +0 -5
- wagtail/admin/templates/wagtailadmin/shared/headers/slim_header.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/page_status_tag_new.html +4 -1
- wagtail/admin/templates/wagtailadmin/shared/pagination_nav.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/side_panel_toggle.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/locale.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/usage.html +2 -2
- wagtail/admin/templates/wagtailadmin/shared/side_panels/preview.html +94 -52
- wagtail/admin/templates/wagtailadmin/{pages/_unsaved_changes_warning.html → shared/unsaved_changes_warning.html} +4 -4
- wagtail/admin/templates/wagtailadmin/shared/usage_summary.html +2 -2
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/detail.html +1 -7
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/listing.html +1 -0
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/{list.html → listing_results.html} +33 -35
- wagtail/admin/templates/wagtailadmin/tables/references_cell.html +1 -1
- wagtail/admin/templates/wagtailadmin/workflows/create.html +11 -36
- wagtail/admin/templates/wagtailadmin/workflows/create_task.html +0 -38
- wagtail/admin/templates/wagtailadmin/workflows/edit.html +44 -74
- wagtail/admin/templates/wagtailadmin/workflows/edit_task.html +27 -66
- wagtail/admin/templates/wagtailadmin/workflows/includes/task_usage_cell.html +4 -2
- wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_tasks_cell.html +4 -4
- wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_used_by_cell.html +15 -11
- wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/results.html +7 -5
- wagtail/admin/templatetags/wagtailadmin_tags.py +51 -22
- wagtail/admin/tests/pages/test_content_type_use_view.py +82 -2
- wagtail/admin/tests/pages/test_edit_page.py +70 -0
- wagtail/admin/tests/pages/test_explorer_view.py +65 -4
- wagtail/admin/tests/pages/test_page_search.py +8 -7
- wagtail/admin/tests/pages/test_page_usage.py +3 -1
- wagtail/admin/tests/pages/test_preview.py +208 -63
- wagtail/admin/tests/pages/test_reorder_page.py +91 -1
- wagtail/admin/tests/pages/test_view_draft.py +32 -1
- wagtail/admin/tests/pages/test_workflow_history.py +288 -7
- wagtail/admin/tests/test_account_management.py +23 -3
- wagtail/admin/tests/test_audit_log.py +24 -2
- wagtail/admin/tests/test_collections_views.py +17 -5
- wagtail/admin/tests/test_dashboard.py +1 -1
- wagtail/admin/tests/test_edit_handlers.py +3 -2
- wagtail/admin/tests/test_icon_sprite.py +4 -0
- wagtail/admin/tests/test_privacy.py +5 -19
- wagtail/admin/tests/test_reports_views.py +1 -1
- wagtail/admin/tests/test_site_summary.py +3 -3
- wagtail/admin/tests/test_templatetags.py +27 -3
- wagtail/admin/tests/test_upgrade_notification.py +71 -18
- wagtail/admin/tests/test_views.py +2 -2
- wagtail/admin/tests/test_views_generic.py +13 -0
- wagtail/admin/tests/test_widgets.py +3 -3
- wagtail/admin/tests/test_workflows.py +172 -27
- wagtail/admin/tests/tests.py +1 -1
- wagtail/admin/tests/viewsets/test_model_viewset.py +55 -3
- wagtail/admin/ui/side_panels.py +19 -0
- wagtail/admin/ui/sidebar.py +4 -3
- wagtail/admin/ui/tables/__init__.py +14 -1
- wagtail/admin/ui/tables/pages.py +6 -1
- wagtail/admin/urls/pages.py +10 -1
- wagtail/admin/urls/workflows.py +6 -1
- wagtail/admin/views/account.py +5 -1
- wagtail/admin/views/collections.py +0 -2
- wagtail/admin/views/generic/base.py +118 -1
- wagtail/admin/views/generic/history.py +158 -26
- wagtail/admin/views/generic/models.py +113 -99
- wagtail/admin/views/home.py +24 -9
- wagtail/admin/views/page_privacy.py +54 -30
- wagtail/admin/views/pages/history.py +11 -4
- wagtail/admin/views/pages/listing.py +76 -89
- wagtail/admin/views/pages/preview.py +1 -1
- wagtail/admin/views/pages/search.py +27 -71
- wagtail/admin/views/pages/usage.py +63 -24
- wagtail/admin/views/pages/utils.py +4 -3
- wagtail/admin/views/reports/base.py +0 -6
- wagtail/admin/views/workflows.py +67 -25
- wagtail/admin/viewsets/model.py +4 -3
- wagtail/admin/widgets/chooser.py +2 -1
- wagtail/api/v2/tests/test_pages.py +15 -2
- wagtail/blocks/field_block.py +15 -3
- wagtail/blocks/static_block.py +3 -0
- wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +29 -1
- wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +15 -11
- wagtail/contrib/forms/templates/wagtailforms/confirm_delete.html +1 -0
- wagtail/contrib/forms/templates/wagtailforms/index.html +1 -1
- wagtail/contrib/forms/templates/wagtailforms/index_results.html +1 -1
- wagtail/contrib/forms/templates/wagtailforms/list_submissions.html +2 -1
- wagtail/contrib/forms/templates/wagtailforms/panels/form_responses_panel.html +2 -2
- wagtail/contrib/forms/tests/test_views.py +234 -35
- wagtail/contrib/forms/utils.py +8 -14
- wagtail/contrib/forms/views.py +72 -27
- wagtail/contrib/frontend_cache/backends/azure.py +1 -1
- wagtail/contrib/frontend_cache/backends/cloudfront.py +2 -2
- wagtail/contrib/frontend_cache/backends/dummy.py +11 -0
- wagtail/contrib/frontend_cache/tests.py +31 -37
- wagtail/contrib/frontend_cache/utils.py +12 -5
- wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +16 -1
- wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +20 -24
- wagtail/contrib/redirects/models.py +16 -1
- wagtail/contrib/redirects/signal_handlers.py +18 -3
- wagtail/contrib/redirects/templates/wagtailredirects/add.html +5 -16
- wagtail/contrib/redirects/templates/wagtailredirects/import_summary.html +1 -1
- wagtail/contrib/redirects/tests/test_redirects.py +49 -6
- wagtail/contrib/redirects/tests/test_signal_handlers.py +42 -1
- wagtail/contrib/redirects/views.py +27 -3
- wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +60 -1
- wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +12 -18
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/add.html +5 -8
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/edit.html +15 -10
- wagtail/contrib/search_promotions/tests.py +13 -2
- wagtail/contrib/search_promotions/views.py +15 -3
- wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.po +6 -1
- wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +2 -10
- wagtail/contrib/settings/templates/wagtailsettings/edit.html +12 -45
- wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.po +13 -1
- wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.po +3 -0
- wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +4 -4
- wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.po +5 -2
- wagtail/contrib/simple_translation/tests/test_views.py +51 -0
- wagtail/contrib/simple_translation/wagtail_hooks.py +16 -11
- wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +5 -1
- wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +27 -1
- wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/blocks.py +25 -0
- wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +12 -1
- wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
- wagtail/contrib/typed_table_block/tests.py +24 -1
- wagtail/coreutils.py +5 -11
- wagtail/documents/admin_urls.py +2 -2
- wagtail/documents/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/cy/LC_MESSAGES/django.po +10 -0
- wagtail/documents/locale/en/LC_MESSAGES/django.po +61 -76
- wagtail/documents/migrations/0014_alter_document_file_size.py +18 -0
- wagtail/documents/models.py +1 -1
- wagtail/documents/rich_text/__init__.py +1 -3
- wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
- wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_add_tags.html +5 -1
- wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_add_to_collection.html +5 -1
- wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_delete.html +11 -5
- wagtail/documents/templates/wagtaildocs/documents/add.html +13 -41
- wagtail/documents/templates/wagtaildocs/documents/edit.html +28 -56
- wagtail/documents/templates/wagtaildocs/documents/index.html +1 -4
- wagtail/documents/templates/wagtaildocs/homepage/site_summary_documents.html +2 -2
- wagtail/documents/templates/wagtaildocs/multiple/add.html +36 -41
- wagtail/documents/tests/test_admin_views.py +64 -6
- wagtail/documents/tests/test_site_summary.py +3 -3
- wagtail/documents/views/documents.py +103 -113
- wagtail/documents/views/multiple.py +19 -1
- wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/oembed_providers.py +9 -19
- wagtail/fields.py +43 -27
- wagtail/images/admin_urls.py +2 -2
- wagtail/images/blocks.py +230 -2
- wagtail/images/fields.py +17 -29
- wagtail/images/image_operations.py +1 -1
- wagtail/images/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/cy/LC_MESSAGES/django.po +128 -1
- wagtail/images/locale/en/LC_MESSAGES/django.po +119 -129
- wagtail/images/migrations/0025_alter_image_file_alter_rendition_file.py +36 -43
- wagtail/images/migrations/0027_image_description.py +20 -0
- wagtail/images/models.py +120 -45
- wagtail/images/rich_text/__init__.py +1 -3
- wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
- wagtail/images/static/wagtailimages/js/image-block.js +1 -0
- wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_add_tags.html +5 -1
- wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_add_to_collection.html +5 -1
- wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_delete.html +11 -5
- wagtail/images/templates/wagtailimages/chooser/results.html +2 -2
- wagtail/images/templates/wagtailimages/homepage/site_summary_images.html +2 -2
- wagtail/images/templates/wagtailimages/images/_file_field.html +2 -2
- wagtail/images/templates/wagtailimages/images/add.html +13 -31
- wagtail/images/templates/wagtailimages/images/edit.html +53 -82
- wagtail/images/templates/wagtailimages/images/index.html +1 -4
- wagtail/images/templates/wagtailimages/images/url_generator.html +1 -1
- wagtail/images/templates/wagtailimages/multiple/add.html +40 -47
- wagtail/images/templates/wagtailimages/widgets/image.html +5 -0
- wagtail/images/templates/wagtailimages/widgets/image_chooser.html +1 -1
- wagtail/images/tests/test_admin_views.py +70 -10
- wagtail/images/tests/test_blocks.py +367 -1
- wagtail/images/tests/test_image_operations.py +23 -0
- wagtail/images/tests/test_models.py +20 -0
- wagtail/images/tests/test_signal_handlers.py +99 -95
- wagtail/images/tests/test_site_summary.py +3 -3
- wagtail/images/tests/test_templatetags.py +11 -7
- wagtail/images/tests/tests.py +4 -0
- wagtail/images/views/images.py +103 -104
- wagtail/images/views/multiple.py +17 -1
- wagtail/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/cy/LC_MESSAGES/django.po +3 -0
- wagtail/locale/en/LC_MESSAGES/django.po +137 -125
- wagtail/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sl/LC_MESSAGES/django.po +3 -0
- wagtail/locales/locale/en/LC_MESSAGES/django.po +8 -8
- wagtail/locales/views.py +4 -1
- wagtail/migrations/0089_log_entry_data_json_null_to_object.py +1 -7
- wagtail/models/__init__.py +122 -14
- wagtail/models/audit_log.py +1 -3
- wagtail/models/i18n.py +1 -2
- wagtail/project_template/Dockerfile +3 -3
- wagtail/project_template/requirements.txt +2 -2
- wagtail/query.py +17 -4
- wagtail/rich_text/__init__.py +2 -3
- wagtail/rich_text/pages.py +2 -4
- wagtail/rich_text/rewriters.py +2 -2
- wagtail/search/backends/database/mysql/query.py +3 -3
- wagtail/search/backends/database/sqlite/query.py +6 -6
- wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/en/LC_MESSAGES/django.po +6 -6
- wagtail/sites/views.py +0 -1
- wagtail/snippets/action_menu.py +14 -4
- wagtail/snippets/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/cy/LC_MESSAGES/django.po +73 -1
- wagtail/snippets/locale/en/LC_MESSAGES/django.po +27 -33
- wagtail/snippets/static/wagtailsnippets/js/snippet-chooser-telepath.js +1 -1
- wagtail/snippets/static/wagtailsnippets/js/snippet-chooser.js +1 -1
- wagtail/snippets/templates/wagtailsnippets/bulk_actions/confirm_bulk_delete.html +5 -3
- wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/locked.html +1 -1
- wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/menu.html +1 -11
- wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/menu_item.html +1 -6
- wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/publish.html +1 -1
- wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/save.html +1 -1
- wagtail/snippets/templates/wagtailsnippets/snippets/create.html +1 -18
- wagtail/snippets/templates/wagtailsnippets/snippets/edit.html +1 -14
- wagtail/snippets/templates/wagtailsnippets/snippets/index.html +2 -5
- wagtail/snippets/tests/test_preview.py +193 -61
- wagtail/snippets/tests/test_snippets.py +247 -38
- wagtail/snippets/tests/test_usage.py +5 -0
- wagtail/snippets/tests/test_viewset.py +25 -9
- wagtail/snippets/tests/test_workflows.py +232 -19
- wagtail/snippets/views/snippets.py +1 -10
- wagtail/test/numberformat.py +104 -0
- wagtail/test/settings.py +10 -0
- wagtail/test/settings_ui.py +2 -0
- wagtail/test/testapp/migrations/0010_alter_customimage_file_and_more.py +71 -78
- wagtail/test/testapp/migrations/0040_nocreatablesubpagetypespage_nosubpagetypespage.py +54 -0
- wagtail/test/testapp/migrations/0041_alter_jsonstreammodel_options.py +17 -0
- wagtail/test/testapp/migrations/0042_alter_customdocument_file_size_and_more.py +28 -0
- wagtail/test/testapp/migrations/0043_customimage_description.py +41 -0
- wagtail/test/testapp/migrations/0044_custompreviewsizesmodel_custompreviewsizespage.py +52 -0
- wagtail/test/testapp/migrations/0045_alter_streampage_body.py +52 -0
- wagtail/test/testapp/models.py +62 -4
- wagtail/test/testapp/rich_text.py +2 -2
- wagtail/test/testapp/templates/tests/form_page_landing.html +2 -1
- wagtail/test/testapp/urls.py +5 -0
- wagtail/test/testapp/views.py +5 -0
- wagtail/test/utils/page_tests.py +5 -5
- wagtail/test/utils/template_tests.py +2 -2
- wagtail/tests/test_blocks.py +15 -0
- wagtail/tests/test_page_permissions.py +109 -0
- wagtail/tests/test_revision_model.py +27 -0
- wagtail/tests/test_signals.py +21 -2
- wagtail/tests/test_tests.py +30 -0
- wagtail/users/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/cy/LC_MESSAGES/django.po +118 -1
- wagtail/users/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/dv/LC_MESSAGES/django.po +3 -0
- wagtail/users/locale/en/LC_MESSAGES/django.po +89 -113
- wagtail/users/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sl/LC_MESSAGES/django.po +3 -0
- wagtail/users/migrations/0014_userprofile_contrast.py +23 -0
- wagtail/users/models.py +11 -0
- wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_assign_role.html +5 -1
- wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_delete.html +5 -1
- wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_set_active_state.html +5 -1
- wagtail/users/templates/wagtailusers/groups/create.html +19 -17
- wagtail/users/templates/wagtailusers/groups/edit.html +2 -40
- wagtail/users/templates/wagtailusers/groups/includes/formatted_permissions.html +1 -62
- wagtail/users/templates/wagtailusers/groups/includes/page_permissions_formset.html +0 -1
- wagtail/users/templates/wagtailusers/users/create.html +46 -50
- wagtail/users/templates/wagtailusers/users/edit.html +45 -62
- wagtail/users/templates/wagtailusers/users/index.html +1 -4
- wagtail/users/templatetags/wagtailusers_tags.py +1 -5
- wagtail/users/tests/test_admin_views.py +85 -66
- wagtail/users/views/groups.py +4 -1
- wagtail/users/views/users.py +2 -0
- {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/METADATA +6 -6
- {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/RECORD +378 -367
- wagtail/admin/static/wagtailadmin/js/preview-panel.js +0 -2
- wagtail/admin/static/wagtailadmin/js/preview-panel.js.LICENSE.txt +0 -11
- wagtail/admin/templates/wagtailadmin/generic/history_results.html +0 -1
- wagtail/admin/templates/wagtailadmin/page_privacy/ancestor_privacy.html +0 -3
- wagtail/admin/templates/wagtailadmin/pages/usage_results.html +0 -6
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/index.html +0 -17
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/results.html +0 -17
- wagtail/admin/templates/wagtailadmin/workflows/usage.html +0 -44
- {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/LICENSE +0 -0
- {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/WHEEL +0 -0
- {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/entry_points.txt +0 -0
- {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/top_level.txt +0 -0
|
@@ -33,6 +33,7 @@ from wagtail.test.utils import TestCase, WagtailTestUtils
|
|
|
33
33
|
("fr", "French"),
|
|
34
34
|
("de", "German"),
|
|
35
35
|
],
|
|
36
|
+
WAGTAIL_I18N_ENABLED=True,
|
|
36
37
|
)
|
|
37
38
|
class TestSubmitTranslationView(WagtailTestUtils, TestCase):
|
|
38
39
|
def setUp(self):
|
|
@@ -118,6 +119,7 @@ class TestSubmitTranslationView(WagtailTestUtils, TestCase):
|
|
|
118
119
|
("fr", "French"),
|
|
119
120
|
("de", "German"),
|
|
120
121
|
],
|
|
122
|
+
WAGTAIL_I18N_ENABLED=True,
|
|
121
123
|
)
|
|
122
124
|
class TestSubmitPageTranslationView(WagtailTestUtils, TestCase):
|
|
123
125
|
def setUp(self):
|
|
@@ -222,6 +224,7 @@ class TestSubmitPageTranslationView(WagtailTestUtils, TestCase):
|
|
|
222
224
|
("fr", "French"),
|
|
223
225
|
("de", "German"),
|
|
224
226
|
],
|
|
227
|
+
WAGTAIL_I18N_ENABLED=True,
|
|
225
228
|
)
|
|
226
229
|
class TestSubmitSnippetTranslationView(WagtailTestUtils, TestCase):
|
|
227
230
|
def setUp(self):
|
|
@@ -401,6 +404,7 @@ class TestSubmitSnippetTranslationWithDraftState(WagtailTestUtils, TestCase):
|
|
|
401
404
|
("de", "German"),
|
|
402
405
|
],
|
|
403
406
|
WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=True,
|
|
407
|
+
WAGTAIL_I18N_ENABLED=True,
|
|
404
408
|
)
|
|
405
409
|
class TestPageTreeSync(WagtailTestUtils, TestCase):
|
|
406
410
|
def setUp(self):
|
|
@@ -438,3 +442,50 @@ class TestPageTreeSync(WagtailTestUtils, TestCase):
|
|
|
438
442
|
|
|
439
443
|
self.assertFalse(en_blog_index.has_translation(self.fr_locale))
|
|
440
444
|
self.assertFalse(en_blog_index.has_translation(self.de_locale))
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
@override_settings(
|
|
448
|
+
LANGUAGES=[
|
|
449
|
+
("en", "English"),
|
|
450
|
+
("fr", "French"),
|
|
451
|
+
("de", "German"),
|
|
452
|
+
],
|
|
453
|
+
WAGTAIL_CONTENT_LANGUAGES=[
|
|
454
|
+
("en", "English"),
|
|
455
|
+
("fr", "French"),
|
|
456
|
+
("de", "German"),
|
|
457
|
+
],
|
|
458
|
+
WAGTAIL_I18N_ENABLED=True,
|
|
459
|
+
)
|
|
460
|
+
class TestPageListing(WagtailTestUtils, TestCase):
|
|
461
|
+
@classmethod
|
|
462
|
+
def setUpTestData(cls):
|
|
463
|
+
cls.en_locale = Locale.objects.first()
|
|
464
|
+
cls.fr_locale = Locale.objects.create(language_code="fr")
|
|
465
|
+
cls.de_locale = Locale.objects.create(language_code="de")
|
|
466
|
+
|
|
467
|
+
cls.en_homepage = Page.objects.get(depth=2)
|
|
468
|
+
cls.pages = []
|
|
469
|
+
for i in range(10):
|
|
470
|
+
instance = TestPage(title=f"Foo {i}", slug=f"foo-{i}")
|
|
471
|
+
cls.pages.append(cls.en_homepage.add_child(instance=instance))
|
|
472
|
+
|
|
473
|
+
def setUp(self):
|
|
474
|
+
self.user = self.login()
|
|
475
|
+
|
|
476
|
+
def test_translate_button_displayed(self):
|
|
477
|
+
url = reverse("wagtailadmin_explore", args=(self.en_homepage.pk,))
|
|
478
|
+
response = self.client.get(url)
|
|
479
|
+
with self.assertNumQueries(41):
|
|
480
|
+
response = self.client.get(url)
|
|
481
|
+
|
|
482
|
+
soup = self.get_soup(response.content)
|
|
483
|
+
page = self.pages[0]
|
|
484
|
+
translate_url = reverse(
|
|
485
|
+
"simple_translation:submit_page_translation",
|
|
486
|
+
args=[page.id],
|
|
487
|
+
)
|
|
488
|
+
translate_button = soup.select_one(f'a[href="{translate_url}"]')
|
|
489
|
+
self.assertIsNotNone(translate_button)
|
|
490
|
+
self.assertEqual(translate_button.text.strip(), "Translate")
|
|
491
|
+
self.assertIsNotNone(translate_button.select_one("svg.icon-globe"))
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
1
|
from django.conf import settings
|
|
4
2
|
from django.contrib.admin.utils import quote
|
|
5
3
|
from django.contrib.auth.models import Permission
|
|
@@ -50,17 +48,24 @@ def register_submit_translation_permission():
|
|
|
50
48
|
@hooks.register("register_page_listing_more_buttons")
|
|
51
49
|
def page_listing_more_buttons(page, user, next_url=None):
|
|
52
50
|
if user.has_perm("simple_translation.submit_translation") and not page.is_root():
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
if hasattr(page, "_has_untranslated_locale"):
|
|
52
|
+
# `_has_untranslated_locale` may be populated by `annotate_has_untranslated_locale`
|
|
53
|
+
# on querysets as a performance optimisation
|
|
54
|
+
has_locale_to_translate_to = page._has_untranslated_locale
|
|
55
|
+
else:
|
|
56
|
+
# If there's at least one locale that we haven't translated into yet,
|
|
57
|
+
# show "Translate this page" button
|
|
58
|
+
has_locale_to_translate_to = Locale.objects.exclude(
|
|
59
|
+
id__in=page.get_translations(inclusive=True).values_list(
|
|
60
|
+
"locale_id", flat=True
|
|
61
|
+
)
|
|
62
|
+
).exists()
|
|
60
63
|
|
|
61
64
|
if has_locale_to_translate_to:
|
|
62
65
|
url = reverse("simple_translation:submit_page_translation", args=[page.id])
|
|
63
|
-
yield wagtailadmin_widgets.Button(
|
|
66
|
+
yield wagtailadmin_widgets.Button(
|
|
67
|
+
_("Translate"), url, icon_name="globe", priority=60
|
|
68
|
+
)
|
|
64
69
|
|
|
65
70
|
|
|
66
71
|
@hooks.register("register_page_header_buttons")
|
|
@@ -118,7 +123,7 @@ def register_snippet_listing_buttons(snippet, user, next_url=None):
|
|
|
118
123
|
|
|
119
124
|
|
|
120
125
|
@hooks.register("construct_translated_pages_to_cascade_actions")
|
|
121
|
-
def construct_translated_pages_to_cascade_actions(pages:
|
|
126
|
+
def construct_translated_pages_to_cascade_actions(pages: list[Page], action: str):
|
|
122
127
|
if not getattr(settings, "WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE", False):
|
|
123
128
|
return
|
|
124
129
|
|
|
Binary file
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
# Adam Hughes <adamhughes31@gmail.com>, 2020
|
|
7
7
|
# Philip Crisp, 2022
|
|
8
8
|
# Philip Crisp, 2022
|
|
9
|
+
# Philip Lindsay-Crisp, 2024
|
|
9
10
|
msgid ""
|
|
10
11
|
msgstr ""
|
|
11
12
|
"Project-Id-Version: Wagtail\n"
|
|
12
13
|
"Report-Msgid-Bugs-To: \n"
|
|
13
14
|
"POT-Creation-Date: 2024-08-07 10:06+0100\n"
|
|
14
15
|
"PO-Revision-Date: 2015-08-26 14:07+0000\n"
|
|
15
|
-
"Last-Translator: Philip Crisp,
|
|
16
|
+
"Last-Translator: Philip Lindsay-Crisp, 2024\n"
|
|
16
17
|
"Language-Team: Welsh (http://app.transifex.com/torchbox/wagtail/language/"
|
|
17
18
|
"cy/)\n"
|
|
18
19
|
"MIME-Version: 1.0\n"
|
|
@@ -25,6 +26,9 @@ msgstr ""
|
|
|
25
26
|
msgid "Wagtail style guide"
|
|
26
27
|
msgstr "Canllaw arddull Wagtail"
|
|
27
28
|
|
|
29
|
+
msgid "Minimap"
|
|
30
|
+
msgstr "Map fychan"
|
|
31
|
+
|
|
28
32
|
msgid "Save"
|
|
29
33
|
msgstr "Cadw"
|
|
30
34
|
|
|
@@ -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: 2024-
|
|
11
|
+
"POT-Creation-Date: 2024-10-21 17:53+0100\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"
|
|
Binary file
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
# Adam Hughes <adamhughes31@gmail.com>, 2020
|
|
7
7
|
# Philip Crisp, 2022
|
|
8
8
|
# Philip Crisp, 2022
|
|
9
|
+
# Philip Lindsay-Crisp, 2024
|
|
9
10
|
msgid ""
|
|
10
11
|
msgstr ""
|
|
11
12
|
"Project-Id-Version: Wagtail\n"
|
|
12
13
|
"Report-Msgid-Bugs-To: \n"
|
|
13
14
|
"POT-Creation-Date: 2024-08-07 10:06+0100\n"
|
|
14
15
|
"PO-Revision-Date: 2016-05-11 20:23+0000\n"
|
|
15
|
-
"Last-Translator: Philip Crisp,
|
|
16
|
+
"Last-Translator: Philip Lindsay-Crisp, 2024\n"
|
|
16
17
|
"Language-Team: Welsh (http://app.transifex.com/torchbox/wagtail/language/"
|
|
17
18
|
"cy/)\n"
|
|
18
19
|
"MIME-Version: 1.0\n"
|
|
@@ -28,11 +29,36 @@ msgstr "Bloc bwrdd Wagtail"
|
|
|
28
29
|
msgid "Row header"
|
|
29
30
|
msgstr "Pennawd rhes"
|
|
30
31
|
|
|
32
|
+
msgid "Table headers"
|
|
33
|
+
msgstr "Penawdau tabl"
|
|
34
|
+
|
|
35
|
+
msgid "Display the first row as a header"
|
|
36
|
+
msgstr "Dangoswch y rhes gyntaf fel pennawd"
|
|
37
|
+
|
|
38
|
+
msgid "Display the first column as a header"
|
|
39
|
+
msgstr "Dangoswch y colofn gyntaf fel pennawd"
|
|
40
|
+
|
|
31
41
|
msgid "Column header"
|
|
32
42
|
msgstr "Pennawd colofn"
|
|
33
43
|
|
|
44
|
+
msgid "Display the first row AND first column as headers"
|
|
45
|
+
msgstr "Dangoswch y rhes gyntaf A'R golofn gyntaf fel pennawd"
|
|
46
|
+
|
|
47
|
+
msgid "No headers"
|
|
48
|
+
msgstr "Dim penawdau"
|
|
49
|
+
|
|
50
|
+
msgid "Which cells should be displayed as headers?"
|
|
51
|
+
msgstr "Pa gelloedd ddylai gael eu harddangos fel penawd?"
|
|
52
|
+
|
|
34
53
|
msgid "Table caption"
|
|
35
54
|
msgstr "Pennawd bwrdd"
|
|
36
55
|
|
|
56
|
+
msgid ""
|
|
57
|
+
"A heading that identifies the overall topic of the table, and is useful for "
|
|
58
|
+
"screen reader users."
|
|
59
|
+
msgstr ""
|
|
60
|
+
"Pennawd sy'n nodi pwnc cyffredinol y tabl, ac sy'n ddefnyddiol i ddefnyddwyr "
|
|
61
|
+
"efo darllenwyr sgrin."
|
|
62
|
+
|
|
37
63
|
msgid "Table"
|
|
38
64
|
msgstr "Bwrdd"
|
|
@@ -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: 2024-
|
|
11
|
+
"POT-Creation-Date: 2024-10-21 17:53+0100\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"
|
|
@@ -163,6 +163,31 @@ class BaseTypedTableBlock(Block):
|
|
|
163
163
|
"caption": "",
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
def get_api_representation(self, table, context=None):
|
|
167
|
+
if table:
|
|
168
|
+
return {
|
|
169
|
+
"columns": [
|
|
170
|
+
{"type": col["block"].name, "heading": col["heading"]}
|
|
171
|
+
for col in table.columns
|
|
172
|
+
],
|
|
173
|
+
"rows": [
|
|
174
|
+
{
|
|
175
|
+
"values": [
|
|
176
|
+
column["block"].get_api_representation(val, context=context)
|
|
177
|
+
for column, val in zip(table.columns, row["values"])
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
for row in table.row_data
|
|
181
|
+
],
|
|
182
|
+
"caption": table.caption,
|
|
183
|
+
}
|
|
184
|
+
else:
|
|
185
|
+
return {
|
|
186
|
+
"columns": [],
|
|
187
|
+
"rows": [],
|
|
188
|
+
"caption": "",
|
|
189
|
+
}
|
|
190
|
+
|
|
166
191
|
def to_python(self, value):
|
|
167
192
|
if value:
|
|
168
193
|
columns = [
|
|
Binary file
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
#
|
|
6
6
|
# Translators:
|
|
7
7
|
# Philip Crisp, 2022
|
|
8
|
+
# Philip Lindsay-Crisp, 2024
|
|
8
9
|
#
|
|
9
10
|
#, fuzzy
|
|
10
11
|
msgid ""
|
|
@@ -13,7 +14,7 @@ msgstr ""
|
|
|
13
14
|
"Report-Msgid-Bugs-To: \n"
|
|
14
15
|
"POT-Creation-Date: 2024-08-07 10:06+0100\n"
|
|
15
16
|
"PO-Revision-Date: 2021-10-15 16:05+0000\n"
|
|
16
|
-
"Last-Translator: Philip Crisp,
|
|
17
|
+
"Last-Translator: Philip Lindsay-Crisp, 2024\n"
|
|
17
18
|
"Language-Team: Welsh (https://app.transifex.com/torchbox/teams/8009/cy/)\n"
|
|
18
19
|
"MIME-Version: 1.0\n"
|
|
19
20
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
@@ -22,6 +23,16 @@ msgstr ""
|
|
|
22
23
|
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != "
|
|
23
24
|
"11) ? 2 : 3;\n"
|
|
24
25
|
|
|
26
|
+
msgid "Caption"
|
|
27
|
+
msgstr "Capsiwn"
|
|
28
|
+
|
|
29
|
+
msgid ""
|
|
30
|
+
"A heading that identifies the overall topic of the table, and is useful for "
|
|
31
|
+
"screen reader users."
|
|
32
|
+
msgstr ""
|
|
33
|
+
"Pennawd sy'n nodi pwnc cyffredinol y tabl, ac sy'n ddefnyddiol i ddefnyddwyr "
|
|
34
|
+
"efo darllenwyr sgrin."
|
|
35
|
+
|
|
25
36
|
msgid "Add column"
|
|
26
37
|
msgstr "Ychwanegu colofn"
|
|
27
38
|
|
|
@@ -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: 2024-
|
|
11
|
+
"POT-Creation-Date: 2024-10-21 17:53+0100\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"
|
|
@@ -18,40 +18,40 @@ msgstr ""
|
|
|
18
18
|
"Content-Transfer-Encoding: 8bit\n"
|
|
19
19
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
20
20
|
|
|
21
|
-
#: blocks.py:
|
|
21
|
+
#: blocks.py:338
|
|
22
22
|
msgid "Caption"
|
|
23
23
|
msgstr ""
|
|
24
24
|
|
|
25
|
-
#: blocks.py:
|
|
25
|
+
#: blocks.py:340
|
|
26
26
|
msgid ""
|
|
27
27
|
"A heading that identifies the overall topic of the table, and is useful for "
|
|
28
28
|
"screen reader users."
|
|
29
29
|
msgstr ""
|
|
30
30
|
|
|
31
|
-
#: blocks.py:
|
|
31
|
+
#: blocks.py:342
|
|
32
32
|
msgid "Add column"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
-
#: blocks.py:
|
|
35
|
+
#: blocks.py:343
|
|
36
36
|
msgid "Add row"
|
|
37
37
|
msgstr ""
|
|
38
38
|
|
|
39
|
-
#: blocks.py:
|
|
39
|
+
#: blocks.py:344
|
|
40
40
|
msgid "Column heading"
|
|
41
41
|
msgstr ""
|
|
42
42
|
|
|
43
|
-
#: blocks.py:
|
|
43
|
+
#: blocks.py:345
|
|
44
44
|
msgid "Insert column"
|
|
45
45
|
msgstr ""
|
|
46
46
|
|
|
47
|
-
#: blocks.py:
|
|
47
|
+
#: blocks.py:346
|
|
48
48
|
msgid "Delete column"
|
|
49
49
|
msgstr ""
|
|
50
50
|
|
|
51
|
-
#: blocks.py:
|
|
51
|
+
#: blocks.py:347
|
|
52
52
|
msgid "Insert row"
|
|
53
53
|
msgstr ""
|
|
54
54
|
|
|
55
|
-
#: blocks.py:
|
|
55
|
+
#: blocks.py:348
|
|
56
56
|
msgid "Delete row"
|
|
57
57
|
msgstr ""
|
|
@@ -14,11 +14,14 @@ from wagtail.contrib.typed_table_block.blocks import (
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class CountryChoiceBlock(blocks.ChoiceBlock):
|
|
17
|
-
"""A ChoiceBlock with a custom rendering, to check that block rendering is honoured"""
|
|
17
|
+
"""A ChoiceBlock with a custom rendering and API representation, to check that block rendering is honoured"""
|
|
18
18
|
|
|
19
19
|
def render_basic(self, value, context=None):
|
|
20
20
|
return value.upper() if value else value
|
|
21
21
|
|
|
22
|
+
def get_api_representation(self, value, context=None):
|
|
23
|
+
return f".{value}" if value else value
|
|
24
|
+
|
|
22
25
|
|
|
23
26
|
class TestTableBlock(TestCase):
|
|
24
27
|
def setUp(self):
|
|
@@ -76,6 +79,18 @@ class TestTableBlock(TestCase):
|
|
|
76
79
|
"caption": "Countries and their food",
|
|
77
80
|
}
|
|
78
81
|
|
|
82
|
+
self.api_data = {
|
|
83
|
+
"columns": [
|
|
84
|
+
{"type": "country", "heading": "Country"},
|
|
85
|
+
{"type": "text", "heading": "Description"},
|
|
86
|
+
],
|
|
87
|
+
"rows": [
|
|
88
|
+
{"values": [".nl", "A small country with stroopwafels"]},
|
|
89
|
+
{"values": [".fr", "A large country with baguettes"]},
|
|
90
|
+
],
|
|
91
|
+
"caption": "Countries and their food",
|
|
92
|
+
}
|
|
93
|
+
|
|
79
94
|
def test_value_from_datadict(self):
|
|
80
95
|
"""
|
|
81
96
|
Test that we can turn posted form data into a TypedTable instance,
|
|
@@ -174,6 +189,14 @@ class TestTableBlock(TestCase):
|
|
|
174
189
|
table_data = self.block.get_prep_value(table)
|
|
175
190
|
self.assertEqual(table_data, self.db_data)
|
|
176
191
|
|
|
192
|
+
def test_get_api_representation(self):
|
|
193
|
+
"""
|
|
194
|
+
Test that the API representation honours custom representations of child blocks
|
|
195
|
+
"""
|
|
196
|
+
table = self.block.to_python(self.db_data)
|
|
197
|
+
table_api_representation = self.block.get_api_representation(table)
|
|
198
|
+
self.assertEqual(table_api_representation, self.api_data)
|
|
199
|
+
|
|
177
200
|
def test_clean(self):
|
|
178
201
|
table = self.block.value_from_datadict(self.form_data, {}, "table")
|
|
179
202
|
# cleaning a valid table should return a TypedTable instance
|
wagtail/coreutils.py
CHANGED
|
@@ -3,8 +3,9 @@ import inspect
|
|
|
3
3
|
import logging
|
|
4
4
|
import re
|
|
5
5
|
import unicodedata
|
|
6
|
+
from collections.abc import Iterable
|
|
6
7
|
from hashlib import md5
|
|
7
|
-
from typing import TYPE_CHECKING, Any,
|
|
8
|
+
from typing import TYPE_CHECKING, Any, Union
|
|
8
9
|
from warnings import warn
|
|
9
10
|
|
|
10
11
|
from anyascii import anyascii
|
|
@@ -256,7 +257,7 @@ def find_available_slug(parent, requested_slug, ignore_page_id=None):
|
|
|
256
257
|
return slug
|
|
257
258
|
|
|
258
259
|
|
|
259
|
-
@functools.
|
|
260
|
+
@functools.cache
|
|
260
261
|
def get_content_languages():
|
|
261
262
|
"""
|
|
262
263
|
Cache of settings.WAGTAIL_CONTENT_LANGUAGES in a dictionary for easy lookups by key.
|
|
@@ -443,14 +444,7 @@ def safe_md5(data=b"", usedforsecurity=True):
|
|
|
443
444
|
to use the digest for secure purposes and to please just go ahead and
|
|
444
445
|
allow it to happen.
|
|
445
446
|
"""
|
|
446
|
-
|
|
447
|
-
# Although ``accepts_kwarg`` works great on Python 3.8+, on Python 3.7 it
|
|
448
|
-
# raises a ValueError, saying "no signature found for builtin". So, back
|
|
449
|
-
# to the try/except.
|
|
450
|
-
try:
|
|
451
|
-
return md5(data, usedforsecurity=usedforsecurity)
|
|
452
|
-
except TypeError:
|
|
453
|
-
return md5(data)
|
|
447
|
+
return md5(data, usedforsecurity=usedforsecurity)
|
|
454
448
|
|
|
455
449
|
|
|
456
450
|
class BatchProcessor:
|
|
@@ -552,7 +546,7 @@ class BatchCreator(BatchProcessor):
|
|
|
552
546
|
if self.max_size and len(self.items) == self.max_size:
|
|
553
547
|
self.process()
|
|
554
548
|
|
|
555
|
-
def extend(self, iterable: Iterable[Union[Model,
|
|
549
|
+
def extend(self, iterable: Iterable[Union[Model, dict[str, Any]]]) -> None:
|
|
556
550
|
for value in iterable:
|
|
557
551
|
if isinstance(value, self.model):
|
|
558
552
|
self.add(instance=value)
|
wagtail/documents/admin_urls.py
CHANGED
|
@@ -10,8 +10,8 @@ urlpatterns = [
|
|
|
10
10
|
documents.IndexView.as_view(results_only=True),
|
|
11
11
|
name="index_results",
|
|
12
12
|
),
|
|
13
|
-
path("add/", documents.
|
|
14
|
-
path("edit/<int:document_id>/", documents.
|
|
13
|
+
path("add/", documents.CreateView.as_view(), name="add"),
|
|
14
|
+
path("edit/<int:document_id>/", documents.EditView.as_view(), name="edit"),
|
|
15
15
|
path("delete/<int:document_id>/", documents.DeleteView.as_view(), name="delete"),
|
|
16
16
|
path("multiple/add/", multiple.AddView.as_view(), name="add_multiple"),
|
|
17
17
|
path("multiple/<int:doc_id>/", multiple.EditView.as_view(), name="edit_multiple"),
|
|
Binary file
|
|
@@ -142,6 +142,13 @@ msgstr "Ia, dileu"
|
|
|
142
142
|
msgid "No, don't delete"
|
|
143
143
|
msgstr "Na, peidiwch a ddileu"
|
|
144
144
|
|
|
145
|
+
msgid ""
|
|
146
|
+
"Why not <a class=\"upload-one-now\" href=\"#tab-upload\" data-tab-"
|
|
147
|
+
"trigger>upload one now</a>?"
|
|
148
|
+
msgstr ""
|
|
149
|
+
"Beth am <a class=\"upload-one-now\" href=\"#tab-upload\" data-tab-"
|
|
150
|
+
"trigger>uwchlwytho un rwan</a>?"
|
|
151
|
+
|
|
145
152
|
msgid "Uploading…"
|
|
146
153
|
msgstr "Wrthi'n uwchlwytho…"
|
|
147
154
|
|
|
@@ -176,6 +183,9 @@ msgstr "Ychwanegu at y casgliad:"
|
|
|
176
183
|
msgid "Sorry, upload failed."
|
|
177
184
|
msgstr "Mae'n ddrwg gennym, ni fu modd uwchlwytho."
|
|
178
185
|
|
|
186
|
+
msgid "Tags"
|
|
187
|
+
msgstr "Tagiau"
|
|
188
|
+
|
|
179
189
|
msgid "Tag"
|
|
180
190
|
msgstr "Tag"
|
|
181
191
|
|