wagtail 6.4.1__py3-none-any.whl → 7.0rc1__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_page.py +4 -4
- wagtail/admin/action_menu.py +3 -0
- wagtail/admin/active_filters.py +218 -0
- wagtail/admin/auth.py +3 -39
- wagtail/admin/forms/choosers.py +8 -7
- wagtail/admin/forms/models.py +46 -1
- wagtail/admin/forms/pages.py +9 -0
- wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ar/LC_MESSAGES/django.po +30 -12
- wagtail/admin/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ar/LC_MESSAGES/djangojs.po +5 -1
- wagtail/admin/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/be/LC_MESSAGES/django.po +27 -13
- wagtail/admin/locale/be/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/be/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/bg/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/bg/LC_MESSAGES/django.po +3 -3
- wagtail/admin/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ca/LC_MESSAGES/django.po +30 -28
- wagtail/admin/locale/ca/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ca/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/cs/LC_MESSAGES/django.po +30 -19
- wagtail/admin/locale/cs/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/cs/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/cy/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/cy/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/da/LC_MESSAGES/django.po +4 -4
- wagtail/admin/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/de/LC_MESSAGES/django.po +33 -30
- wagtail/admin/locale/de/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/de/LC_MESSAGES/djangojs.po +5 -1
- wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/dv/LC_MESSAGES/django.po +7 -18
- wagtail/admin/locale/dv/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/dv/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/el/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/el/LC_MESSAGES/django.po +9 -8
- wagtail/admin/locale/el/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/el/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/en/LC_MESSAGES/django.po +386 -319
- wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +11 -7
- wagtail/admin/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/es/LC_MESSAGES/django.po +32 -22
- wagtail/admin/locale/es/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/es/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/es_419/LC_MESSAGES/django.po +2 -1
- wagtail/admin/locale/es_VE/LC_MESSAGES/django.po +2 -1
- wagtail/admin/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/et/LC_MESSAGES/django.po +30 -19
- wagtail/admin/locale/et/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/et/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fa/LC_MESSAGES/django.po +10 -9
- wagtail/admin/locale/fa/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/fa/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fi/LC_MESSAGES/django.po +30 -21
- wagtail/admin/locale/fi/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/fi/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fr/LC_MESSAGES/django.po +80 -24
- wagtail/admin/locale/fr/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/fr/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/gl/LC_MESSAGES/django.po +75 -22
- wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/he_IL/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/he_IL/LC_MESSAGES/django.po +5 -5
- wagtail/admin/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/hr_HR/LC_MESSAGES/django.po +30 -19
- wagtail/admin/locale/hr_HR/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/hr_HR/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/hu/LC_MESSAGES/django.po +350 -25
- wagtail/admin/locale/hu/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/hu/LC_MESSAGES/djangojs.po +8 -0
- wagtail/admin/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/id_ID/LC_MESSAGES/django.po +11 -11
- wagtail/admin/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/is_IS/LC_MESSAGES/django.po +30 -29
- wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/it/LC_MESSAGES/django.po +30 -29
- wagtail/admin/locale/it/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/it/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ja/LC_MESSAGES/django.po +14 -15
- wagtail/admin/locale/ja/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ja/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ko/LC_MESSAGES/django.po +92 -19
- wagtail/admin/locale/ko/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ko/LC_MESSAGES/djangojs.po +16 -0
- wagtail/admin/locale/lt/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/lt/LC_MESSAGES/django.po +30 -15
- wagtail/admin/locale/lt/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/lt/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/lv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/lv/LC_MESSAGES/django.po +10 -9
- wagtail/admin/locale/lv/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/lv/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/mi/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/mi/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/mn/LC_MESSAGES/django.po +12 -11
- wagtail/admin/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/nb/LC_MESSAGES/django.po +31 -15
- wagtail/admin/locale/nb/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/nb/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/django.po +32 -29
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pl/LC_MESSAGES/django.po +30 -22
- wagtail/admin/locale/pl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/pl/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +33 -28
- wagtail/admin/locale/pt_BR/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/pt_BR/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pt_PT/LC_MESSAGES/django.po +31 -18
- wagtail/admin/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/pt_PT/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ro/LC_MESSAGES/django.po +30 -28
- wagtail/admin/locale/ro/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ro/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ru/LC_MESSAGES/django.po +34 -29
- wagtail/admin/locale/ru/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ru/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sk_SK/LC_MESSAGES/django.po +6 -6
- wagtail/admin/locale/sk_SK/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/sk_SK/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sl/LC_MESSAGES/django.po +31 -27
- wagtail/admin/locale/sl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/sl/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sv/LC_MESSAGES/django.po +30 -18
- wagtail/admin/locale/sv/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/sv/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/tet/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tet/LC_MESSAGES/django.po +5 -5
- wagtail/admin/locale/tet/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/tet/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/th/LC_MESSAGES/django.po +10 -17
- wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tr/LC_MESSAGES/django.po +28 -13
- wagtail/admin/locale/tr/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/tr/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tr_TR/LC_MESSAGES/django.po +28 -13
- wagtail/admin/locale/tr_TR/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/tr_TR/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ug/LC_MESSAGES/django.po +12 -29
- wagtail/admin/locale/ug/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ug/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/uk/LC_MESSAGES/django.po +30 -26
- wagtail/admin/locale/uk/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/uk/LC_MESSAGES/djangojs.po +6 -3
- wagtail/admin/locale/vi/LC_MESSAGES/django.po +2 -1
- wagtail/admin/locale/zh/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh/LC_MESSAGES/django.po +2 -2
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.po +33 -18
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.po +11 -14
- wagtail/admin/locale/zh_Hant/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/zh_Hant/LC_MESSAGES/djangojs.po +3 -0
- wagtail/admin/localization.py +42 -1
- wagtail/admin/menu.py +1 -10
- wagtail/admin/paginator.py +95 -0
- wagtail/admin/panels/field_panel.py +27 -6
- wagtail/admin/panels/inline_panel.py +28 -11
- wagtail/admin/panels/multiple_chooser_panel.py +3 -3
- wagtail/admin/rich_text/converters/html_to_contentstate.py +6 -6
- wagtail/admin/search.py +1 -10
- wagtail/admin/static/wagtailadmin/css/core.css +1 -1
- wagtail/admin/static/wagtailadmin/css/panels/draftail.css +1 -1
- wagtail/admin/static/wagtailadmin/js/bulk-actions.js +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/draftail.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/telepath/widgets.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +32 -11
- wagtail/admin/static/wagtailadmin/js/workflow-action.js +1 -1
- wagtail/admin/templates/wagtailadmin/admin_base.html +1 -0
- wagtail/admin/templates/wagtailadmin/generic/index.html +7 -2
- wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +2 -3
- wagtail/admin/templates/wagtailadmin/pages/action_menu/publish.html +2 -2
- wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_move.html +0 -1
- wagtail/admin/templates/wagtailadmin/pages/move_choose_destination.html +0 -1
- wagtail/admin/templates/wagtailadmin/panels/publishing/schedule_publishing_panel.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/active_filters.html +8 -1
- wagtail/admin/templates/wagtailadmin/shared/pagination_nav.html +25 -13
- wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/privacy.html +1 -2
- wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/workflow.html +1 -1
- wagtail/admin/templates/wagtailadmin/skeleton.html +2 -1
- wagtail/admin/templates/wagtailadmin/tables/locale_cell.html +4 -0
- wagtail/admin/templates/wagtailadmin/userbar/base.html +10 -8
- wagtail/admin/templatetags/wagtailadmin_tags.py +57 -132
- wagtail/admin/tests/pages/test_bulk_actions/test_bulk_move.py +31 -0
- wagtail/admin/tests/pages/test_create_page.py +627 -0
- wagtail/admin/tests/pages/test_edit_page.py +102 -18
- wagtail/admin/tests/pages/test_explorer_view.py +55 -26
- wagtail/admin/tests/pages/test_page_search.py +10 -0
- wagtail/admin/tests/pages/test_page_usage.py +2 -1
- wagtail/admin/tests/pages/test_preview.py +176 -36
- wagtail/admin/tests/pages/test_revisions.py +4 -7
- wagtail/admin/tests/test_account_management.py +1 -1
- wagtail/admin/tests/test_admin_search.py +1 -0
- wagtail/admin/tests/test_buttons_hooks.py +9 -145
- wagtail/admin/tests/test_collections_views.py +60 -0
- wagtail/admin/tests/test_contentstate.py +1 -1
- wagtail/admin/tests/test_dashboard.py +25 -0
- wagtail/admin/tests/test_edit_handlers.py +64 -0
- wagtail/admin/tests/test_forms.py +38 -0
- wagtail/admin/tests/test_keyboard_shortcuts.py +141 -5
- wagtail/admin/tests/test_page_chooser.py +2 -2
- wagtail/admin/tests/test_paginator.py +86 -0
- wagtail/admin/tests/test_privacy.py +12 -1
- wagtail/admin/tests/test_reports_views.py +8 -43
- wagtail/admin/tests/test_rich_text.py +14 -0
- wagtail/admin/tests/test_templatetags.py +50 -36
- wagtail/admin/tests/test_userbar.py +79 -15
- wagtail/admin/tests/test_views.py +16 -1
- wagtail/admin/tests/test_widgets.py +47 -8
- wagtail/admin/tests/test_workflows.py +119 -6
- wagtail/admin/tests/tests.py +16 -15
- wagtail/admin/tests/ui/test_sidebar.py +0 -27
- wagtail/admin/tests/viewsets/test_chooser_viewset.py +38 -4
- wagtail/admin/tests/viewsets/test_model_viewset.py +1 -37
- wagtail/admin/ui/side_panels.py +14 -16
- wagtail/admin/ui/sidebar.py +5 -37
- wagtail/admin/ui/tables/__init__.py +34 -2
- wagtail/admin/ui/tables/pages.py +9 -0
- wagtail/admin/urls/__init__.py +2 -2
- wagtail/admin/urls/pages.py +3 -1
- wagtail/admin/userbar.py +3 -5
- wagtail/admin/utils.py +43 -4
- wagtail/admin/views/generic/base.py +16 -115
- wagtail/admin/views/generic/chooser.py +25 -8
- wagtail/admin/views/generic/mixins.py +45 -11
- wagtail/admin/views/generic/models.py +15 -30
- wagtail/admin/views/generic/preview.py +9 -3
- wagtail/admin/views/generic/workflow.py +11 -1
- wagtail/admin/views/i18n.py +14 -0
- wagtail/admin/views/pages/bulk_actions/move.py +1 -1
- wagtail/admin/views/pages/create.py +68 -6
- wagtail/admin/views/pages/edit.py +33 -14
- wagtail/admin/views/pages/listing.py +3 -2
- wagtail/admin/views/pages/move.py +43 -29
- wagtail/admin/views/pages/preview.py +15 -2
- wagtail/admin/views/pages/search.py +3 -0
- wagtail/admin/views/reports/base.py +0 -22
- wagtail/admin/views/reports/page_types_usage.py +2 -1
- wagtail/admin/views/tags.py +3 -1
- wagtail/admin/views/workflows.py +0 -3
- wagtail/admin/viewsets/model.py +5 -48
- wagtail/admin/wagtail_hooks.py +16 -17
- wagtail/admin/widgets/button.py +3 -33
- wagtail/admin/widgets/tags.py +31 -3
- wagtail/api/v2/views.py +4 -4
- wagtail/blocks/base.py +18 -15
- wagtail/blocks/field_block.py +2 -1
- wagtail/blocks/stream_block.py +15 -11
- wagtail/compat.py +17 -1
- wagtail/contrib/forms/forms.py +10 -7
- wagtail/contrib/forms/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/cs/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/forms/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/de/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/forms/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/forms/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +4 -4
- wagtail/contrib/forms/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/fr/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/hy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/mn/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/forms/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/pl/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/forms/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/ro/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/forms/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/sl/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/zh_Hans/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/forms/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/tests/test_forms.py +62 -0
- wagtail/contrib/frontend_cache/backends/cloudfront.py +1 -29
- wagtail/contrib/frontend_cache/tests.py +112 -52
- wagtail/contrib/frontend_cache/utils.py +109 -17
- wagtail/contrib/redirects/forms.py +3 -2
- wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/redirects/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/redirects/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +8 -8
- wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po +3 -1
- wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po +18 -2
- wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/redirects/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/tmp_storages.py +1 -0
- wagtail/contrib/routable_page/tests.py +3 -3
- wagtail/contrib/search_promotions/forms.py +3 -2
- wagtail/contrib/search_promotions/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/bg/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/bg/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.po +3 -6
- wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.po +3 -6
- wagtail/contrib/search_promotions/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +19 -23
- wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.po +3 -6
- wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.po +3 -6
- wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/ht/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ht/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.po +11 -5
- wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.po +5 -4
- wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/mi/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/mi/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/mn/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/my/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/my/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.po +3 -6
- wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.po +3 -6
- wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/vi/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/vi/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/zh/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/zh/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.po +1 -4
- wagtail/contrib/search_promotions/models.py +1 -7
- wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/queries/chooser/results.html +1 -1
- wagtail/contrib/search_promotions/tests.py +4 -5
- wagtail/contrib/search_promotions/views/settings.py +1 -2
- wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/registry.py +1 -11
- wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.po +5 -2
- wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.po +3 -2
- wagtail/contrib/styleguide/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/styleguide/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/styleguide/locale/el/LC_MESSAGES/django.po +2 -1
- wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +7 -7
- wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/styleguide/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/views.py +2 -1
- wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/blocks.py +5 -0
- wagtail/contrib/typed_table_block/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
- wagtail/contrib/typed_table_block/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/tests.py +27 -0
- wagtail/coreutils.py +0 -19
- wagtail/documents/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ar/LC_MESSAGES/django.po +3 -2
- wagtail/documents/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ca/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/de/LC_MESSAGES/django.po +3 -3
- wagtail/documents/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/documents/locale/el/LC_MESSAGES/django.po +2 -1
- wagtail/documents/locale/en/LC_MESSAGES/django.po +4 -4
- wagtail/documents/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/es/LC_MESSAGES/django.po +3 -2
- wagtail/documents/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/fi/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/fr/LC_MESSAGES/django.po +2 -1
- wagtail/documents/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/hu/LC_MESSAGES/django.po +18 -3
- wagtail/documents/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/it/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ko/LC_MESSAGES/django.po +14 -2
- wagtail/documents/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/nb/LC_MESSAGES/django.po +3 -2
- wagtail/documents/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/nl/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/pl/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/pt_BR/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ro/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ru/LC_MESSAGES/django.po +5 -2
- wagtail/documents/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sk_SK/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sl/LC_MESSAGES/django.po +2 -2
- wagtail/documents/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.po +3 -2
- wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/documents/rich_text/contentstate.py +1 -0
- wagtail/documents/rich_text/editor_html.py +1 -0
- wagtail/documents/tests/test_collection_privacy.py +1 -1
- wagtail/documents/tests/test_serializers.py +0 -1
- wagtail/documents/views/serve.py +0 -15
- wagtail/documents/wagtail_hooks.py +2 -17
- wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/rich_text/contentstate.py +1 -0
- wagtail/embeds/rich_text/editor_html.py +1 -0
- wagtail/embeds/wagtail_hooks.py +1 -1
- wagtail/images/formats.py +0 -11
- wagtail/images/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ca/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/cs/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/cy/LC_MESSAGES/django.po +2 -1
- wagtail/images/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/de/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/images/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/en/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/fa/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/fi/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/fr/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/gl/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/hu/LC_MESSAGES/django.po +23 -3
- wagtail/images/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/it/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ko/LC_MESSAGES/django.po +31 -2
- wagtail/images/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/mn/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/nb/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/nl/LC_MESSAGES/django.po +4 -5
- wagtail/images/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/pl/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/pt_BR/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ro/LC_MESSAGES/django.po +3 -2
- wagtail/images/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ru/LC_MESSAGES/django.po +5 -2
- wagtail/images/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/sk_SK/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/sl/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/sv/LC_MESSAGES/django.po +2 -2
- wagtail/images/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/uk/LC_MESSAGES/django.po +5 -4
- wagtail/images/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/zh_Hans/LC_MESSAGES/django.po +2 -1
- wagtail/images/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/images/management/commands/wagtail_update_image_renditions.py +1 -1
- wagtail/images/models.py +23 -7
- wagtail/images/tests/test_admin_views.py +1 -1
- wagtail/images/tests/test_models.py +33 -0
- wagtail/images/tests/tests.py +0 -6
- wagtail/images/wagtail_hooks.py +2 -2
- wagtail/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ar/LC_MESSAGES/django.po +50 -50
- wagtail/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/be/LC_MESSAGES/django.po +52 -51
- wagtail/locale/bg/LC_MESSAGES/django.po +4 -4
- wagtail/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ca/LC_MESSAGES/django.po +234 -234
- wagtail/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/cs/LC_MESSAGES/django.po +172 -172
- wagtail/locale/cy/LC_MESSAGES/django.po +12 -12
- wagtail/locale/da/LC_MESSAGES/django.po +7 -7
- wagtail/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/de/LC_MESSAGES/django.po +237 -236
- wagtail/locale/dv/LC_MESSAGES/django.po +216 -215
- wagtail/locale/el/LC_MESSAGES/django.po +76 -75
- wagtail/locale/en/LC_MESSAGES/django.po +339 -339
- wagtail/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/es/LC_MESSAGES/django.po +192 -192
- wagtail/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/et/LC_MESSAGES/django.po +173 -173
- wagtail/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/locale/fa/LC_MESSAGES/django.po +50 -50
- wagtail/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/fi/LC_MESSAGES/django.po +187 -187
- wagtail/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/fr/LC_MESSAGES/django.po +236 -235
- wagtail/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/gl/LC_MESSAGES/django.po +235 -235
- wagtail/locale/he_IL/LC_MESSAGES/django.po +9 -9
- wagtail/locale/hr_HR/LC_MESSAGES/django.po +184 -184
- wagtail/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/hu/LC_MESSAGES/django.po +251 -229
- wagtail/locale/id_ID/LC_MESSAGES/django.po +49 -49
- wagtail/locale/is_IS/LC_MESSAGES/django.po +232 -232
- wagtail/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/it/LC_MESSAGES/django.po +224 -224
- wagtail/locale/ja/LC_MESSAGES/django.po +110 -110
- wagtail/locale/ka/LC_MESSAGES/django.po +4 -4
- wagtail/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ko/LC_MESSAGES/django.po +88 -53
- wagtail/locale/lt/LC_MESSAGES/django.po +53 -53
- wagtail/locale/lv/LC_MESSAGES/django.po +22 -22
- wagtail/locale/mi/LC_MESSAGES/django.po +167 -167
- wagtail/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/mn/LC_MESSAGES/django.po +51 -50
- wagtail/locale/my/LC_MESSAGES/django.po +6 -6
- wagtail/locale/nb/LC_MESSAGES/django.po +50 -50
- wagtail/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/nl/LC_MESSAGES/django.po +233 -233
- wagtail/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/pl/LC_MESSAGES/django.po +232 -232
- wagtail/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/pt_BR/LC_MESSAGES/django.po +202 -202
- wagtail/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/pt_PT/LC_MESSAGES/django.po +180 -178
- wagtail/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ro/LC_MESSAGES/django.po +233 -232
- wagtail/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ru/LC_MESSAGES/django.po +237 -234
- wagtail/locale/sk_SK/LC_MESSAGES/django.po +47 -47
- wagtail/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sl/LC_MESSAGES/django.po +233 -233
- wagtail/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sv/LC_MESSAGES/django.po +207 -207
- wagtail/locale/tet/LC_MESSAGES/django.po +37 -37
- wagtail/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/th/LC_MESSAGES/django.po +54 -53
- wagtail/locale/tr/LC_MESSAGES/django.po +50 -50
- wagtail/locale/tr_TR/LC_MESSAGES/django.po +50 -50
- wagtail/locale/ug/LC_MESSAGES/django.po +232 -232
- wagtail/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/uk/LC_MESSAGES/django.po +185 -185
- wagtail/locale/vi/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/vi/LC_MESSAGES/django.po +20 -19
- wagtail/locale/zh/LC_MESSAGES/django.po +4 -4
- wagtail/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/zh_Hans/LC_MESSAGES/django.po +189 -189
- wagtail/locale/zh_Hant/LC_MESSAGES/django.po +161 -161
- wagtail/locales/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/en/LC_MESSAGES/django.po +26 -14
- wagtail/locales/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/fr/LC_MESSAGES/django.po +14 -2
- wagtail/locales/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/gl/LC_MESSAGES/django.po +13 -3
- wagtail/locales/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/locales/tests.py +32 -1
- wagtail/locales/views.py +39 -7
- wagtail/models/__init__.py +67 -5002
- wagtail/models/audit_log.py +1 -1
- wagtail/models/content_types.py +11 -0
- wagtail/models/draft_state.py +197 -0
- wagtail/models/locking.py +82 -0
- wagtail/models/orderable.py +10 -0
- wagtail/models/pages.py +2754 -0
- wagtail/models/preview.py +281 -0
- wagtail/models/reference_index.py +1 -1
- wagtail/models/revisions.py +433 -0
- wagtail/models/view_restrictions.py +3 -3
- wagtail/models/workflows.py +1348 -0
- wagtail/project_template/home/apps.py +6 -0
- wagtail/project_template/manage.py-tpl +22 -0
- wagtail/project_template/project_name/settings/base.py +1 -0
- wagtail/project_template/requirements.txt +2 -2
- wagtail/search/backends/base.py +4 -0
- wagtail/search/backends/database/mysql/query.py +8 -4
- wagtail/search/backends/elasticsearch7.py +17 -7
- wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/search/tests/elasticsearch_common_tests.py +43 -0
- wagtail/search/tests/test_backends.py +43 -13
- wagtail/search/tests/test_mysql_backend.py +22 -0
- wagtail/search/tests/test_page_search.py +2 -1
- wagtail/search/tests/test_queries.py +2 -2
- wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/action_menu.py +9 -30
- wagtail/snippets/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ar/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/az_AZ/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/be/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/bg/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/bn/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/ca/LC_MESSAGES/django.po +5 -5
- wagtail/snippets/locale/cs/LC_MESSAGES/django.po +5 -4
- wagtail/snippets/locale/cy/LC_MESSAGES/django.po +5 -4
- wagtail/snippets/locale/da/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/de/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/dv/LC_MESSAGES/django.po +5 -4
- wagtail/snippets/locale/el/LC_MESSAGES/django.po +5 -4
- wagtail/snippets/locale/en/LC_MESSAGES/django.po +31 -23
- wagtail/snippets/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/es/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/es_419/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/et/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/fa/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/fi/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/fr/LC_MESSAGES/django.po +13 -6
- wagtail/snippets/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/gl/LC_MESSAGES/django.po +11 -5
- wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/hr_HR/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/hu/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po +5 -6
- wagtail/snippets/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/it/LC_MESSAGES/django.po +5 -5
- wagtail/snippets/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/ja/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/ka/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/ko/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/lt/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/lv/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/mi/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/mn/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/my/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/nb/LC_MESSAGES/django.po +5 -4
- wagtail/snippets/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/nl/LC_MESSAGES/django.po +5 -5
- wagtail/snippets/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/pl/LC_MESSAGES/django.po +5 -5
- wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po +7 -5
- wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po +7 -5
- wagtail/snippets/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/ro/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/ru/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/sl/LC_MESSAGES/django.po +5 -5
- wagtail/snippets/locale/sr/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/sv/LC_MESSAGES/django.po +5 -5
- wagtail/snippets/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/tet/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/th/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/tr/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/tr_TR/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/ug/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/uk/LC_MESSAGES/django.po +6 -6
- wagtail/snippets/locale/vi/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/zh/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.po +6 -5
- wagtail/snippets/locale/zh_Hant/LC_MESSAGES/django.po +4 -4
- wagtail/snippets/permissions.py +6 -4
- 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/snippets/action_menu/publish.html +3 -5
- wagtail/snippets/tests/test_preview.py +62 -38
- wagtail/snippets/tests/test_snippets.py +313 -130
- wagtail/snippets/tests/test_viewset.py +69 -6
- wagtail/snippets/tests/test_workflows.py +0 -4
- wagtail/snippets/views/snippets.py +29 -53
- wagtail/snippets/wagtail_hooks.py +3 -7
- wagtail/test/apps.py +5 -0
- wagtail/test/context_processors.py +19 -0
- wagtail/test/customuser/forms.py +19 -0
- wagtail/test/customuser/viewsets.py +12 -0
- wagtail/test/settings.py +8 -9
- wagtail/test/testapp/migrations/0046_alter_custom_rendition_to_unique_constraint.py +24 -0
- wagtail/test/testapp/migrations/{0046_advertwithcustomuuidprimarykey_page.py → 0047_advertwithcustomuuidprimarykey_page.py} +1 -1
- wagtail/test/testapp/migrations/0048_requireddatepage.py +36 -0
- wagtail/test/testapp/migrations/0049_promotionalpage.py +35 -0
- wagtail/test/testapp/migrations/0050_headcountrelatedmodelusingpk_related_page.py +25 -0
- wagtail/test/testapp/migrations/0051_userapprovaltaskstate_userapprovaltask.py +59 -0
- wagtail/test/testapp/models.py +183 -26
- wagtail/test/testapp/templates/tests/workflows/approve_with_style.html +6 -0
- wagtail/test/testapp/views.py +7 -1
- wagtail/test/testapp/wagtail_hooks.py +6 -0
- wagtail/test/utils/form_data.py +1 -0
- wagtail/tests/test_blocks.py +0 -18
- wagtail/tests/test_management_commands.py +1 -1
- wagtail/tests/test_page_model.py +27 -0
- wagtail/tests/test_page_privacy.py +1 -1
- wagtail/tests/test_reference_index.py +26 -0
- wagtail/tests/test_streamfield.py +136 -0
- wagtail/tests/test_utils.py +1 -23
- wagtail/users/forms.py +3 -17
- wagtail/users/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/be/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/ca/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/cs/LC_MESSAGES/django.po +2 -1
- wagtail/users/locale/cy/LC_MESSAGES/django.po +2 -1
- wagtail/users/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/de/LC_MESSAGES/django.po +3 -3
- wagtail/users/locale/dv/LC_MESSAGES/django.po +2 -1
- wagtail/users/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/en/LC_MESSAGES/django.po +71 -71
- wagtail/users/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/fa/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/fi/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/fr/LC_MESSAGES/django.po +4 -2
- wagtail/users/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/gl/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/hr_HR/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/hu/LC_MESSAGES/django.po +45 -3
- wagtail/users/locale/hy/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/it/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/ko/LC_MESSAGES/django.po +47 -2
- wagtail/users/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/mn/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/nb/LC_MESSAGES/django.po +2 -1
- wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/nl/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/pl/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/pt_BR/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/pt_PT/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/ro/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/ru/LC_MESSAGES/django.po +4 -2
- wagtail/users/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sk_SK/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sl/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sv/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/th/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/uk/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/vi/LC_MESSAGES/django.po +2 -1
- wagtail/users/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/zh_Hans/LC_MESSAGES/django.po +3 -2
- wagtail/users/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/users/models.py +7 -1
- wagtail/users/templatetags/wagtailusers_tags.py +0 -29
- wagtail/users/tests/__init__.py +0 -6
- wagtail/users/tests/test_admin_views.py +285 -611
- wagtail/users/views/groups.py +1 -28
- wagtail/users/views/users.py +3 -45
- wagtail/utils/deprecation.py +3 -3
- wagtail/whitelist.py +1 -0
- wagtail/workflows.py +2 -2
- wagtail-7.0rc1.dist-info/METADATA +224 -0
- {wagtail-6.4.1.dist-info → wagtail-7.0rc1.dist-info}/RECORD +1194 -1174
- {wagtail-6.4.1.dist-info → wagtail-7.0rc1.dist-info}/WHEEL +1 -1
- wagtail/admin/templates/wagtailadmin/shared/ajax_pagination_nav.html +0 -25
- wagtail/project_template/manage.py +0 -10
- wagtail/utils/setup.py +0 -90
- wagtail/utils/widgets.py +0 -46
- wagtail-6.4.1.dist-info/METADATA +0 -77
- {wagtail-6.4.1.dist-info → wagtail-7.0rc1.dist-info}/entry_points.txt +0 -0
- {wagtail-6.4.1.dist-info → wagtail-7.0rc1.dist-info/licenses}/LICENSE +0 -0
- {wagtail-6.4.1.dist-info → wagtail-7.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import unittest.mock
|
|
2
2
|
|
|
3
|
-
from django import forms
|
|
4
3
|
from django.apps import apps
|
|
5
4
|
from django.conf import settings
|
|
6
5
|
from django.contrib.admin.utils import quote
|
|
@@ -11,7 +10,6 @@ from django.core.exceptions import ImproperlyConfigured
|
|
|
11
10
|
from django.core.files.uploadedfile import SimpleUploadedFile
|
|
12
11
|
from django.db.models import Q
|
|
13
12
|
from django.http import HttpRequest, HttpResponse
|
|
14
|
-
from django.template import RequestContext, Template
|
|
15
13
|
from django.test import TestCase, override_settings
|
|
16
14
|
from django.urls import reverse
|
|
17
15
|
from django.utils import timezone
|
|
@@ -23,7 +21,6 @@ from wagtail.admin.models import Admin
|
|
|
23
21
|
from wagtail.admin.staticfiles import versioned_static
|
|
24
22
|
from wagtail.admin.widgets.button import ButtonWithDropdown
|
|
25
23
|
from wagtail.compat import AUTH_USER_APP_LABEL, AUTH_USER_MODEL_NAME
|
|
26
|
-
from wagtail.coreutils import get_dummy_request
|
|
27
24
|
from wagtail.log_actions import log
|
|
28
25
|
from wagtail.models import (
|
|
29
26
|
Collection,
|
|
@@ -33,20 +30,17 @@ from wagtail.models import (
|
|
|
33
30
|
LockableMixin,
|
|
34
31
|
Page,
|
|
35
32
|
)
|
|
33
|
+
from wagtail.test.customuser.forms import CustomUserCreationForm, CustomUserEditForm
|
|
34
|
+
from wagtail.test.customuser.viewsets import CustomUserViewSet
|
|
36
35
|
from wagtail.test.utils import WagtailTestUtils
|
|
37
36
|
from wagtail.test.utils.template_tests import AdminTemplateTestUtils
|
|
38
|
-
from wagtail.users.forms import GroupForm
|
|
37
|
+
from wagtail.users.forms import GroupForm
|
|
39
38
|
from wagtail.users.models import UserProfile
|
|
40
39
|
from wagtail.users.permission_order import register as register_permission_order
|
|
41
40
|
from wagtail.users.views.groups import GroupViewSet
|
|
42
|
-
from wagtail.users.views.users import
|
|
43
|
-
UserViewSet,
|
|
44
|
-
get_user_creation_form,
|
|
45
|
-
get_user_edit_form,
|
|
46
|
-
)
|
|
41
|
+
from wagtail.users.views.users import UserViewSet
|
|
47
42
|
from wagtail.users.wagtail_hooks import get_viewset_cls
|
|
48
43
|
from wagtail.users.widgets import UserListingButton
|
|
49
|
-
from wagtail.utils.deprecation import RemovedInWagtail70Warning
|
|
50
44
|
|
|
51
45
|
add_user_perm_codename = f"add_{AUTH_USER_MODEL_NAME.lower()}"
|
|
52
46
|
delete_user_perm_codename = f"delete_{AUTH_USER_MODEL_NAME.lower()}"
|
|
@@ -63,16 +57,6 @@ class CustomGroupForm(GroupForm):
|
|
|
63
57
|
pass
|
|
64
58
|
|
|
65
59
|
|
|
66
|
-
class CustomUserCreationForm(UserCreationForm):
|
|
67
|
-
country = forms.CharField(required=True, label="Country")
|
|
68
|
-
attachment = forms.FileField(required=True, label="Attachment")
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class CustomUserEditForm(UserEditForm):
|
|
72
|
-
country = forms.CharField(required=True, label="Country")
|
|
73
|
-
attachment = forms.FileField(required=True, label="Attachment")
|
|
74
|
-
|
|
75
|
-
|
|
76
60
|
class CustomGroupViewSet(GroupViewSet):
|
|
77
61
|
icon = "custom-icon"
|
|
78
62
|
|
|
@@ -80,110 +64,6 @@ class CustomGroupViewSet(GroupViewSet):
|
|
|
80
64
|
return CustomGroupForm
|
|
81
65
|
|
|
82
66
|
|
|
83
|
-
class CustomUserViewSet(UserViewSet):
|
|
84
|
-
icon = "custom-icon"
|
|
85
|
-
|
|
86
|
-
def get_form_class(self, for_update=False):
|
|
87
|
-
if for_update:
|
|
88
|
-
return CustomUserEditForm
|
|
89
|
-
return CustomUserCreationForm
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
class TestUserFormHelpers(TestCase):
|
|
93
|
-
def test_get_user_edit_form_with_default_form(self):
|
|
94
|
-
user_form = get_user_edit_form()
|
|
95
|
-
self.assertIs(user_form, UserEditForm)
|
|
96
|
-
|
|
97
|
-
def test_get_user_creation_form_with_default_form(self):
|
|
98
|
-
user_form = get_user_creation_form()
|
|
99
|
-
self.assertIs(user_form, UserCreationForm)
|
|
100
|
-
|
|
101
|
-
@override_settings(
|
|
102
|
-
WAGTAIL_USER_CREATION_FORM="wagtail.users.tests.CustomUserCreationForm"
|
|
103
|
-
)
|
|
104
|
-
def test_get_user_creation_form_with_custom_form(self):
|
|
105
|
-
with self.assertWarnsMessage(
|
|
106
|
-
RemovedInWagtail70Warning,
|
|
107
|
-
"The `WAGTAIL_USER_CREATION_FORM` setting is deprecated. Use a custom "
|
|
108
|
-
"`UserViewSet` subclass and override `get_form_class()` instead.",
|
|
109
|
-
):
|
|
110
|
-
user_form = get_user_creation_form()
|
|
111
|
-
self.assertIs(user_form, CustomUserCreationForm)
|
|
112
|
-
|
|
113
|
-
@override_settings(WAGTAIL_USER_EDIT_FORM="wagtail.users.tests.CustomUserEditForm")
|
|
114
|
-
def test_get_user_edit_form_with_custom_form(self):
|
|
115
|
-
with self.assertWarnsMessage(
|
|
116
|
-
RemovedInWagtail70Warning,
|
|
117
|
-
"The `WAGTAIL_USER_EDIT_FORM` setting is deprecated. Use a custom "
|
|
118
|
-
"`UserViewSet` subclass and override `get_form_class()` instead.",
|
|
119
|
-
):
|
|
120
|
-
user_form = get_user_edit_form()
|
|
121
|
-
self.assertIs(user_form, CustomUserEditForm)
|
|
122
|
-
|
|
123
|
-
@override_settings(
|
|
124
|
-
WAGTAIL_USER_CREATION_FORM="wagtail.users.tests.CustomUserCreationFormDoesNotExist"
|
|
125
|
-
)
|
|
126
|
-
def test_get_user_creation_form_with_invalid_form(self):
|
|
127
|
-
with self.assertWarnsMessage(
|
|
128
|
-
RemovedInWagtail70Warning,
|
|
129
|
-
"The `WAGTAIL_USER_CREATION_FORM` setting is deprecated. Use a custom "
|
|
130
|
-
"`UserViewSet` subclass and override `get_form_class()` instead.",
|
|
131
|
-
):
|
|
132
|
-
self.assertRaises(ImproperlyConfigured, get_user_creation_form)
|
|
133
|
-
|
|
134
|
-
@override_settings(
|
|
135
|
-
WAGTAIL_USER_EDIT_FORM="wagtail.users.tests.CustomUserEditFormDoesNotExist"
|
|
136
|
-
)
|
|
137
|
-
def test_get_user_edit_form_with_invalid_form(self):
|
|
138
|
-
with self.assertWarnsMessage(
|
|
139
|
-
RemovedInWagtail70Warning,
|
|
140
|
-
"The `WAGTAIL_USER_EDIT_FORM` setting is deprecated. Use a custom "
|
|
141
|
-
"`UserViewSet` subclass and override `get_form_class()` instead.",
|
|
142
|
-
):
|
|
143
|
-
self.assertRaises(ImproperlyConfigured, get_user_edit_form)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
class TestGroupUsersView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
147
|
-
def setUp(self):
|
|
148
|
-
# create a user that should be visible in the listing
|
|
149
|
-
self.test_user = self.create_user(
|
|
150
|
-
username="testuser",
|
|
151
|
-
email="testuser@email.com",
|
|
152
|
-
password="password",
|
|
153
|
-
first_name="First Name",
|
|
154
|
-
last_name="Last Name",
|
|
155
|
-
)
|
|
156
|
-
self.test_group = Group.objects.create(name="Test Group")
|
|
157
|
-
self.test_user.groups.add(self.test_group)
|
|
158
|
-
self.login()
|
|
159
|
-
|
|
160
|
-
def get(self, params={}, group_id=None):
|
|
161
|
-
return self.client.get(
|
|
162
|
-
reverse(
|
|
163
|
-
"wagtailusers_groups:users", args=(group_id or self.test_group.pk,)
|
|
164
|
-
),
|
|
165
|
-
params,
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
def test_simple(self):
|
|
169
|
-
with self.assertWarnsMessage(
|
|
170
|
-
RemovedInWagtail70Warning,
|
|
171
|
-
"Accessing the list of users in a group via "
|
|
172
|
-
f"/admin/groups/{self.test_group.pk}/users/ is deprecated, use "
|
|
173
|
-
f"/admin/users/?group={self.test_group.pk} instead.",
|
|
174
|
-
):
|
|
175
|
-
response = self.get()
|
|
176
|
-
|
|
177
|
-
self.assertRedirects(
|
|
178
|
-
response,
|
|
179
|
-
reverse("wagtailusers_users:index") + f"?group={self.test_group.pk}",
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
def test_inexisting_group(self):
|
|
183
|
-
response = self.get(group_id=9999)
|
|
184
|
-
self.assertEqual(response.status_code, 404)
|
|
185
|
-
|
|
186
|
-
|
|
187
67
|
class TestUserIndexView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
188
68
|
def setUp(self):
|
|
189
69
|
# create a user that should be visible in the listing
|
|
@@ -456,6 +336,21 @@ class TestUserIndexResultsView(AdminTemplateTestUtils, WagtailTestUtils, TestCas
|
|
|
456
336
|
class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
457
337
|
def setUp(self):
|
|
458
338
|
self.login()
|
|
339
|
+
self.post_data = {
|
|
340
|
+
"username": "testuser",
|
|
341
|
+
"email": "test@user.com",
|
|
342
|
+
"first_name": "Test",
|
|
343
|
+
"last_name": "User",
|
|
344
|
+
"password1": "password",
|
|
345
|
+
"password2": "password",
|
|
346
|
+
}
|
|
347
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
348
|
+
self.post_data.update(
|
|
349
|
+
{
|
|
350
|
+
"country": "testcountry",
|
|
351
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
352
|
+
}
|
|
353
|
+
)
|
|
459
354
|
|
|
460
355
|
def get(self, params={}):
|
|
461
356
|
return self.client.get(reverse("wagtailusers_users:add"), params)
|
|
@@ -484,14 +379,7 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
484
379
|
|
|
485
380
|
def test_create(self):
|
|
486
381
|
response = self.post(
|
|
487
|
-
|
|
488
|
-
"username": "testuser",
|
|
489
|
-
"email": "test@user.com",
|
|
490
|
-
"first_name": "Test",
|
|
491
|
-
"last_name": "User",
|
|
492
|
-
"password1": "password",
|
|
493
|
-
"password2": "password",
|
|
494
|
-
},
|
|
382
|
+
self.post_data,
|
|
495
383
|
follow=True,
|
|
496
384
|
)
|
|
497
385
|
|
|
@@ -505,50 +393,18 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
505
393
|
self.assertContains(response, "User 'test@user.com' created.")
|
|
506
394
|
else:
|
|
507
395
|
self.assertContains(response, "User 'testuser' created.")
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
settings.AUTH_USER_MODEL == "customuser.CustomUser",
|
|
511
|
-
"Only applicable to CustomUser",
|
|
512
|
-
)
|
|
513
|
-
@override_settings(
|
|
514
|
-
WAGTAIL_USER_CREATION_FORM="wagtail.users.tests.CustomUserCreationForm",
|
|
515
|
-
)
|
|
516
|
-
def test_create_with_custom_form(self):
|
|
517
|
-
response = self.post(
|
|
518
|
-
{
|
|
519
|
-
"username": "testuser",
|
|
520
|
-
"email": "test@user.com",
|
|
521
|
-
"first_name": "Test",
|
|
522
|
-
"last_name": "User",
|
|
523
|
-
"password1": "password",
|
|
524
|
-
"password2": "password",
|
|
525
|
-
"country": "testcountry",
|
|
526
|
-
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
527
|
-
}
|
|
528
|
-
)
|
|
529
|
-
|
|
530
|
-
# Should redirect back to index
|
|
531
|
-
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
532
|
-
|
|
533
|
-
# Check that the user was created
|
|
534
|
-
users = get_user_model().objects.filter(email="test@user.com")
|
|
535
|
-
self.assertEqual(users.count(), 1)
|
|
536
|
-
self.assertEqual(users.first().country, "testcountry")
|
|
537
|
-
self.assertEqual(users.first().attachment.read(), b"Uploaded file")
|
|
396
|
+
self.assertEqual(users.first().country, "testcountry")
|
|
397
|
+
self.assertEqual(users.first().attachment.read(), b"Uploaded file")
|
|
538
398
|
|
|
539
399
|
def test_create_with_whitespaced_password(self):
|
|
540
400
|
"""Password should not be stripped"""
|
|
541
|
-
self.
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
"password2": " whitespaced_password ",
|
|
549
|
-
},
|
|
550
|
-
follow=True,
|
|
551
|
-
)
|
|
401
|
+
post_data = self.post_data.copy()
|
|
402
|
+
post_data["username"] = "testuser2"
|
|
403
|
+
post_data["email"] = "test@user2.com"
|
|
404
|
+
post_data["password1"] = " whitespaced_password "
|
|
405
|
+
post_data["password2"] = " whitespaced_password "
|
|
406
|
+
|
|
407
|
+
self.post(post_data, follow=True)
|
|
552
408
|
# Try to login with the password
|
|
553
409
|
self.client.logout()
|
|
554
410
|
username = "testuser2"
|
|
@@ -557,16 +413,10 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
557
413
|
self.login(username=username, password=" whitespaced_password ")
|
|
558
414
|
|
|
559
415
|
def test_create_with_password_mismatch(self):
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
"first_name": "Test",
|
|
565
|
-
"last_name": "User",
|
|
566
|
-
"password1": "password1",
|
|
567
|
-
"password2": "password2",
|
|
568
|
-
}
|
|
569
|
-
)
|
|
416
|
+
post_data = self.post_data.copy()
|
|
417
|
+
post_data["password1"] = "password1"
|
|
418
|
+
post_data["password2"] = "password2"
|
|
419
|
+
response = self.post(post_data)
|
|
570
420
|
|
|
571
421
|
# Should remain on page
|
|
572
422
|
self.assertEqual(response.status_code, 200)
|
|
@@ -591,17 +441,13 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
591
441
|
Specifically test that the UserAttributeSimilarityValidator works,
|
|
592
442
|
which requires a full-populated user model before the validation works.
|
|
593
443
|
"""
|
|
444
|
+
post_data = self.post_data.copy()
|
|
594
445
|
# Create a user with a password the same as their name
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
"last_name": "Name",
|
|
601
|
-
"password1": "example name",
|
|
602
|
-
"password2": "example name",
|
|
603
|
-
}
|
|
604
|
-
)
|
|
446
|
+
post_data["first_name"] = "Example"
|
|
447
|
+
post_data["last_name"] = "Name"
|
|
448
|
+
post_data["password1"] = "example name"
|
|
449
|
+
post_data["password2"] = "example name"
|
|
450
|
+
response = self.post(post_data)
|
|
605
451
|
|
|
606
452
|
# Should remain on page
|
|
607
453
|
self.assertEqual(response.status_code, 200)
|
|
@@ -618,16 +464,10 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
618
464
|
|
|
619
465
|
def test_create_with_missing_password(self):
|
|
620
466
|
"""Password should be required by default"""
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
"first_name": "Test",
|
|
626
|
-
"last_name": "User",
|
|
627
|
-
"password1": "",
|
|
628
|
-
"password2": "",
|
|
629
|
-
}
|
|
630
|
-
)
|
|
467
|
+
post_data = self.post_data.copy()
|
|
468
|
+
post_data["password1"] = ""
|
|
469
|
+
post_data["password2"] = ""
|
|
470
|
+
response = self.post(post_data)
|
|
631
471
|
|
|
632
472
|
# Should remain on page
|
|
633
473
|
self.assertEqual(response.status_code, 200)
|
|
@@ -651,16 +491,11 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
651
491
|
@override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)
|
|
652
492
|
def test_create_with_password_not_required(self):
|
|
653
493
|
"""Password should not be required if WAGTAILUSERS_PASSWORD_REQUIRED is False"""
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
"last_name": "User",
|
|
660
|
-
"password1": "",
|
|
661
|
-
"password2": "",
|
|
662
|
-
}
|
|
663
|
-
)
|
|
494
|
+
post_data = self.post_data.copy()
|
|
495
|
+
post_data["password1"] = ""
|
|
496
|
+
post_data["password2"] = ""
|
|
497
|
+
|
|
498
|
+
response = self.post(post_data)
|
|
664
499
|
|
|
665
500
|
# Should redirect back to index
|
|
666
501
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -673,16 +508,11 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
673
508
|
@override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)
|
|
674
509
|
def test_optional_password_is_still_validated(self):
|
|
675
510
|
"""When WAGTAILUSERS_PASSWORD_REQUIRED is False, password validation should still apply if a password _is_ supplied"""
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
"last_name": "User",
|
|
682
|
-
"password1": "banana",
|
|
683
|
-
"password2": "kumquat",
|
|
684
|
-
}
|
|
685
|
-
)
|
|
511
|
+
post_data = self.post_data.copy()
|
|
512
|
+
post_data["password1"] = "banana"
|
|
513
|
+
post_data["password2"] = "kumquat"
|
|
514
|
+
|
|
515
|
+
response = self.post(post_data)
|
|
686
516
|
|
|
687
517
|
# Should remain on page
|
|
688
518
|
self.assertEqual(response.status_code, 200)
|
|
@@ -697,16 +527,11 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
697
527
|
@override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)
|
|
698
528
|
def test_password_still_accepted_when_optional(self):
|
|
699
529
|
"""When WAGTAILUSERS_PASSWORD_REQUIRED is False, we should still allow a password to be set"""
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
"last_name": "User",
|
|
706
|
-
"password1": "banana",
|
|
707
|
-
"password2": "banana",
|
|
708
|
-
}
|
|
709
|
-
)
|
|
530
|
+
post_data = self.post_data.copy()
|
|
531
|
+
post_data["password1"] = "banana"
|
|
532
|
+
post_data["password2"] = "banana"
|
|
533
|
+
|
|
534
|
+
response = self.post(post_data)
|
|
710
535
|
|
|
711
536
|
# Should redirect back to index
|
|
712
537
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -728,16 +553,10 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
728
553
|
@override_settings(WAGTAILUSERS_PASSWORD_ENABLED=False)
|
|
729
554
|
def test_password_fields_ignored_when_disabled(self):
|
|
730
555
|
"""When WAGTAILUSERS_PASSWORD_ENABLED is False, users should always be created without a usable password"""
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
"first_name": "Test",
|
|
736
|
-
"last_name": "User",
|
|
737
|
-
"password1": "banana", # not part of the form - should be ignored
|
|
738
|
-
"password2": "kumquat", # not part of the form - should be ignored
|
|
739
|
-
}
|
|
740
|
-
)
|
|
556
|
+
post_data = self.post_data.copy()
|
|
557
|
+
post_data["password1"] = "banana" # not part of the form - should be ignored
|
|
558
|
+
post_data["password2"] = "kumquat" # not part of the form - should be ignored
|
|
559
|
+
response = self.post(post_data)
|
|
741
560
|
|
|
742
561
|
# Should redirect back to index
|
|
743
562
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -763,15 +582,9 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
763
582
|
return HttpResponse("Overridden!")
|
|
764
583
|
|
|
765
584
|
with self.register_hook("before_create_user", hook_func):
|
|
766
|
-
|
|
767
|
-
"
|
|
768
|
-
|
|
769
|
-
"password1": "password12",
|
|
770
|
-
"password2": "password12",
|
|
771
|
-
"first_name": "test",
|
|
772
|
-
"last_name": "user",
|
|
773
|
-
}
|
|
774
|
-
response = self.client.post(reverse("wagtailusers_users:add"), post_data)
|
|
585
|
+
response = self.client.post(
|
|
586
|
+
reverse("wagtailusers_users:add"), self.post_data
|
|
587
|
+
)
|
|
775
588
|
self.assertEqual(response.status_code, 200)
|
|
776
589
|
self.assertEqual(response.content, b"Overridden!")
|
|
777
590
|
|
|
@@ -782,15 +595,9 @@ class TestUserCreateView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
782
595
|
return HttpResponse("Overridden!")
|
|
783
596
|
|
|
784
597
|
with self.register_hook("after_create_user", hook_func):
|
|
785
|
-
|
|
786
|
-
"
|
|
787
|
-
|
|
788
|
-
"password1": "password12",
|
|
789
|
-
"password2": "password12",
|
|
790
|
-
"first_name": "test",
|
|
791
|
-
"last_name": "user",
|
|
792
|
-
}
|
|
793
|
-
response = self.client.post(reverse("wagtailusers_users:add"), post_data)
|
|
598
|
+
response = self.client.post(
|
|
599
|
+
reverse("wagtailusers_users:add"), self.post_data
|
|
600
|
+
)
|
|
794
601
|
self.assertEqual(response.status_code, 200)
|
|
795
602
|
self.assertEqual(response.content, b"Overridden!")
|
|
796
603
|
|
|
@@ -1002,6 +809,23 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1002
809
|
password="password",
|
|
1003
810
|
)
|
|
1004
811
|
|
|
812
|
+
self.post_data = {
|
|
813
|
+
"username": "testuser",
|
|
814
|
+
"email": "test@user.com",
|
|
815
|
+
"first_name": "Edited",
|
|
816
|
+
"last_name": "User",
|
|
817
|
+
"password1": "newpassword",
|
|
818
|
+
"password2": "newpassword",
|
|
819
|
+
"is_active": "on",
|
|
820
|
+
}
|
|
821
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
822
|
+
self.post_data.update(
|
|
823
|
+
{
|
|
824
|
+
"country": "testcountry",
|
|
825
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
|
|
1005
829
|
# Login
|
|
1006
830
|
self.current_user = self.login()
|
|
1007
831
|
|
|
@@ -1049,22 +873,6 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1049
873
|
url_finder = AdminURLFinder(self.current_user)
|
|
1050
874
|
self.assertEqual(url_finder.get_edit_url(self.test_user), edit_url)
|
|
1051
875
|
|
|
1052
|
-
def test_legacy_url_redirect(self):
|
|
1053
|
-
with self.assertWarnsMessage(
|
|
1054
|
-
RemovedInWagtail70Warning,
|
|
1055
|
-
(
|
|
1056
|
-
"UserViewSet's `/<pk>/` edit view URL pattern has been "
|
|
1057
|
-
"deprecated in favour of /edit/<pk>/."
|
|
1058
|
-
),
|
|
1059
|
-
):
|
|
1060
|
-
response = self.client.get(f"/admin/users/{self.test_user.pk}/")
|
|
1061
|
-
|
|
1062
|
-
self.assertRedirects(
|
|
1063
|
-
response,
|
|
1064
|
-
f"/admin/users/edit/{self.test_user.pk}/",
|
|
1065
|
-
status_code=301,
|
|
1066
|
-
)
|
|
1067
|
-
|
|
1068
876
|
def test_nonexistent_redirect(self):
|
|
1069
877
|
invalid_id = (
|
|
1070
878
|
"99999999-9999-9999-9999-999999999999"
|
|
@@ -1074,18 +882,7 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1074
882
|
self.assertEqual(self.get(user_id=invalid_id).status_code, 404)
|
|
1075
883
|
|
|
1076
884
|
def test_simple_post(self):
|
|
1077
|
-
response = self.post(
|
|
1078
|
-
{
|
|
1079
|
-
"username": "testuser",
|
|
1080
|
-
"email": "test@user.com",
|
|
1081
|
-
"first_name": "Edited",
|
|
1082
|
-
"last_name": "User",
|
|
1083
|
-
"password1": "newpassword",
|
|
1084
|
-
"password2": "newpassword",
|
|
1085
|
-
"is_active": "on",
|
|
1086
|
-
},
|
|
1087
|
-
follow=True,
|
|
1088
|
-
)
|
|
885
|
+
response = self.post(self.post_data, follow=True)
|
|
1089
886
|
# Should redirect back to index
|
|
1090
887
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
1091
888
|
|
|
@@ -1097,6 +894,8 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1097
894
|
self.assertContains(response, "User 'test@user.com' updated.")
|
|
1098
895
|
else:
|
|
1099
896
|
self.assertContains(response, "User 'testuser' updated.")
|
|
897
|
+
self.assertEqual(user.country, "testcountry")
|
|
898
|
+
self.assertEqual(user.attachment.read(), b"Uploaded file")
|
|
1100
899
|
|
|
1101
900
|
# On next load of the edit view,
|
|
1102
901
|
# should render the status panel with the last updated time
|
|
@@ -1117,17 +916,10 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1117
916
|
|
|
1118
917
|
def test_password_optional(self):
|
|
1119
918
|
"""Leaving password fields blank should leave it unchanged"""
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
"first_name": "Edited",
|
|
1125
|
-
"last_name": "User",
|
|
1126
|
-
"password1": "",
|
|
1127
|
-
"password2": "",
|
|
1128
|
-
"is_active": "on",
|
|
1129
|
-
}
|
|
1130
|
-
)
|
|
919
|
+
post_data = self.post_data.copy()
|
|
920
|
+
post_data["password1"] = ""
|
|
921
|
+
post_data["password2"] = ""
|
|
922
|
+
response = self.post(post_data)
|
|
1131
923
|
# Should redirect back to index
|
|
1132
924
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
1133
925
|
|
|
@@ -1138,17 +930,10 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1138
930
|
|
|
1139
931
|
def test_passwords_match(self):
|
|
1140
932
|
"""Password fields should be validated if supplied"""
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
"first_name": "Edited",
|
|
1146
|
-
"last_name": "User",
|
|
1147
|
-
"password1": "banana",
|
|
1148
|
-
"password2": "kumquat",
|
|
1149
|
-
"is_active": "on",
|
|
1150
|
-
}
|
|
1151
|
-
)
|
|
933
|
+
post_data = self.post_data.copy()
|
|
934
|
+
post_data["password1"] = "banana"
|
|
935
|
+
post_data["password2"] = "kumquat"
|
|
936
|
+
response = self.post(post_data)
|
|
1152
937
|
# Should remain on page
|
|
1153
938
|
self.assertEqual(response.status_code, 200)
|
|
1154
939
|
self.assertTemplateUsed(response, "wagtailusers/users/edit.html")
|
|
@@ -1174,16 +959,12 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1174
959
|
which requires a full-populated user model before the validation works.
|
|
1175
960
|
"""
|
|
1176
961
|
# Create a user with a password the same as their name
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
"password1": "edited name",
|
|
1184
|
-
"password2": "edited name",
|
|
1185
|
-
}
|
|
1186
|
-
)
|
|
962
|
+
post_data = self.post_data.copy()
|
|
963
|
+
post_data["first_name"] = "Edited"
|
|
964
|
+
post_data["last_name"] = "Name"
|
|
965
|
+
post_data["password1"] = "edited name"
|
|
966
|
+
post_data["password2"] = "edited name"
|
|
967
|
+
response = self.post(post_data)
|
|
1187
968
|
|
|
1188
969
|
# Should remain on page
|
|
1189
970
|
self.assertEqual(response.status_code, 200)
|
|
@@ -1200,19 +981,10 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1200
981
|
self.assertTrue(user.check_password("password"))
|
|
1201
982
|
|
|
1202
983
|
def test_edit_and_deactivate(self):
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
"first_name": "Edited",
|
|
1208
|
-
"last_name": "User",
|
|
1209
|
-
"password1": "password",
|
|
1210
|
-
"password2": "password",
|
|
1211
|
-
# Leaving out these fields, thus setting them to False:
|
|
1212
|
-
# 'is_active': 'on'
|
|
1213
|
-
# 'is_superuser': 'on',
|
|
1214
|
-
}
|
|
1215
|
-
)
|
|
984
|
+
post_data = self.post_data.copy()
|
|
985
|
+
del post_data["is_active"]
|
|
986
|
+
|
|
987
|
+
response = self.post(post_data)
|
|
1216
988
|
|
|
1217
989
|
# Should redirect back to index
|
|
1218
990
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -1226,18 +998,9 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1226
998
|
self.assertIs(user.is_active, False)
|
|
1227
999
|
|
|
1228
1000
|
def test_edit_and_make_superuser(self):
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
"email": "test@user.com",
|
|
1233
|
-
"first_name": "Edited",
|
|
1234
|
-
"last_name": "User",
|
|
1235
|
-
"password1": "password",
|
|
1236
|
-
"password2": "password",
|
|
1237
|
-
"is_active": "on",
|
|
1238
|
-
"is_superuser": "on",
|
|
1239
|
-
}
|
|
1240
|
-
)
|
|
1001
|
+
post_data = self.post_data.copy()
|
|
1002
|
+
post_data["is_superuser"] = "on"
|
|
1003
|
+
response = self.post(post_data)
|
|
1241
1004
|
|
|
1242
1005
|
# Should redirect back to index
|
|
1243
1006
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -1251,19 +1014,25 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1251
1014
|
self.assertIs(user.is_active, True)
|
|
1252
1015
|
|
|
1253
1016
|
def test_edit_self(self):
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1017
|
+
post_data = {
|
|
1018
|
+
"username": "test@email.com",
|
|
1019
|
+
"email": "test@email.com",
|
|
1020
|
+
"first_name": "Edited Myself",
|
|
1021
|
+
"last_name": "User",
|
|
1022
|
+
# 'password1': "password",
|
|
1023
|
+
# 'password2': "password",
|
|
1024
|
+
"is_active": "on",
|
|
1025
|
+
"is_superuser": "on",
|
|
1026
|
+
}
|
|
1027
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
1028
|
+
post_data.update(
|
|
1029
|
+
{
|
|
1030
|
+
"country": "testcountry",
|
|
1031
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
1032
|
+
}
|
|
1033
|
+
)
|
|
1034
|
+
|
|
1035
|
+
response = self.post(post_data, self.current_user.pk)
|
|
1267
1036
|
|
|
1268
1037
|
# Should redirect back to index
|
|
1269
1038
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -1278,19 +1047,24 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1278
1047
|
self.assertIs(user.is_active, True)
|
|
1279
1048
|
|
|
1280
1049
|
def test_editing_own_password_does_not_log_out(self):
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1050
|
+
post_data = {
|
|
1051
|
+
"username": "test@email.com",
|
|
1052
|
+
"email": "test@email.com",
|
|
1053
|
+
"first_name": "Edited Myself",
|
|
1054
|
+
"last_name": "User",
|
|
1055
|
+
"password1": "c0rrecth0rse",
|
|
1056
|
+
"password2": "c0rrecth0rse",
|
|
1057
|
+
"is_active": "on",
|
|
1058
|
+
"is_superuser": "on",
|
|
1059
|
+
}
|
|
1060
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
1061
|
+
post_data.update(
|
|
1062
|
+
{
|
|
1063
|
+
"country": "testcountry",
|
|
1064
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
1065
|
+
}
|
|
1066
|
+
)
|
|
1067
|
+
response = self.post(post_data, self.current_user.pk)
|
|
1294
1068
|
|
|
1295
1069
|
# Should redirect back to index
|
|
1296
1070
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -1307,21 +1081,27 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1307
1081
|
"""
|
|
1308
1082
|
check that unsetting a user's own is_active or is_superuser flag has no effect
|
|
1309
1083
|
"""
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1084
|
+
post_data = {
|
|
1085
|
+
"username": "test@email.com",
|
|
1086
|
+
"email": "test@email.com",
|
|
1087
|
+
"first_name": "Edited Myself",
|
|
1088
|
+
"last_name": "User",
|
|
1089
|
+
# 'password1': "password",
|
|
1090
|
+
# 'password2': "password",
|
|
1091
|
+
# failing to submit is_active or is_superuser would unset those flags,
|
|
1092
|
+
# if we didn't explicitly prevent that when editing self
|
|
1093
|
+
# 'is_active': 'on',
|
|
1094
|
+
# 'is_superuser': 'on',
|
|
1095
|
+
}
|
|
1096
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
1097
|
+
post_data.update(
|
|
1098
|
+
{
|
|
1099
|
+
"country": "testcountry",
|
|
1100
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
1101
|
+
}
|
|
1102
|
+
)
|
|
1103
|
+
|
|
1104
|
+
response = self.post(post_data, self.current_user.pk)
|
|
1325
1105
|
|
|
1326
1106
|
# Should redirect back to index
|
|
1327
1107
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -1335,36 +1115,6 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1335
1115
|
# Check that the user is still active
|
|
1336
1116
|
self.assertIs(user.is_active, True)
|
|
1337
1117
|
|
|
1338
|
-
@unittest.skipUnless(
|
|
1339
|
-
settings.AUTH_USER_MODEL == "customuser.CustomUser",
|
|
1340
|
-
"Only applicable to CustomUser",
|
|
1341
|
-
)
|
|
1342
|
-
@override_settings(
|
|
1343
|
-
WAGTAIL_USER_EDIT_FORM="wagtail.users.tests.CustomUserEditForm",
|
|
1344
|
-
)
|
|
1345
|
-
def test_edit_with_custom_form(self):
|
|
1346
|
-
response = self.post(
|
|
1347
|
-
{
|
|
1348
|
-
"username": "testuser",
|
|
1349
|
-
"email": "test@user.com",
|
|
1350
|
-
"first_name": "Edited",
|
|
1351
|
-
"last_name": "User",
|
|
1352
|
-
"password1": "password",
|
|
1353
|
-
"password2": "password",
|
|
1354
|
-
"country": "testcountry",
|
|
1355
|
-
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
1356
|
-
}
|
|
1357
|
-
)
|
|
1358
|
-
|
|
1359
|
-
# Should redirect back to index
|
|
1360
|
-
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
1361
|
-
|
|
1362
|
-
# Check that the user was edited
|
|
1363
|
-
user = get_user_model().objects.get(pk=self.test_user.pk)
|
|
1364
|
-
self.assertEqual(user.first_name, "Edited")
|
|
1365
|
-
self.assertEqual(user.country, "testcountry")
|
|
1366
|
-
self.assertEqual(user.attachment.read(), b"Uploaded file")
|
|
1367
|
-
|
|
1368
1118
|
@unittest.skipIf(
|
|
1369
1119
|
settings.AUTH_USER_MODEL == "emailuser.EmailUser", "Not applicable to EmailUser"
|
|
1370
1120
|
)
|
|
@@ -1378,6 +1128,8 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1378
1128
|
"last_name": "User",
|
|
1379
1129
|
"password1": "password",
|
|
1380
1130
|
"password2": "password",
|
|
1131
|
+
"country": "testcountry",
|
|
1132
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
1381
1133
|
}
|
|
1382
1134
|
)
|
|
1383
1135
|
|
|
@@ -1396,17 +1148,10 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1396
1148
|
@override_settings(WAGTAILUSERS_PASSWORD_ENABLED=False)
|
|
1397
1149
|
def test_password_fields_ignored_when_disabled(self):
|
|
1398
1150
|
"""When WAGTAILUSERS_PASSWORD_REQUIRED is False, existing password should be left unchanged"""
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
"first_name": "Edited",
|
|
1404
|
-
"last_name": "User",
|
|
1405
|
-
"is_active": "on",
|
|
1406
|
-
"password1": "banana", # not part of the form - should be ignored
|
|
1407
|
-
"password2": "kumquat", # not part of the form - should be ignored
|
|
1408
|
-
}
|
|
1409
|
-
)
|
|
1151
|
+
post_data = self.post_data.copy()
|
|
1152
|
+
post_data["password1"] = "banana" # not part of the form - should be ignored
|
|
1153
|
+
post_data["password2"] = "kumquat" # not part of the form - should be ignored
|
|
1154
|
+
response = self.post(post_data)
|
|
1410
1155
|
|
|
1411
1156
|
# Should redirect back to index
|
|
1412
1157
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
@@ -1439,16 +1184,9 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1439
1184
|
return HttpResponse("Overridden!")
|
|
1440
1185
|
|
|
1441
1186
|
with self.register_hook("before_edit_user", hook_func):
|
|
1442
|
-
post_data = {
|
|
1443
|
-
"username": "testuser",
|
|
1444
|
-
"email": "test@user.com",
|
|
1445
|
-
"first_name": "Edited",
|
|
1446
|
-
"last_name": "User",
|
|
1447
|
-
"password1": "password",
|
|
1448
|
-
"password2": "password",
|
|
1449
|
-
}
|
|
1450
1187
|
response = self.client.post(
|
|
1451
|
-
reverse("wagtailusers_users:edit", args=(self.test_user.pk,)),
|
|
1188
|
+
reverse("wagtailusers_users:edit", args=(self.test_user.pk,)),
|
|
1189
|
+
self.post_data,
|
|
1452
1190
|
)
|
|
1453
1191
|
|
|
1454
1192
|
self.assertEqual(response.status_code, 200)
|
|
@@ -1462,16 +1200,9 @@ class TestUserEditView(AdminTemplateTestUtils, WagtailTestUtils, TestCase):
|
|
|
1462
1200
|
return HttpResponse("Overridden!")
|
|
1463
1201
|
|
|
1464
1202
|
with self.register_hook("after_edit_user", hook_func):
|
|
1465
|
-
post_data = {
|
|
1466
|
-
"username": "testuser",
|
|
1467
|
-
"email": "test@user.com",
|
|
1468
|
-
"first_name": "Edited",
|
|
1469
|
-
"last_name": "User",
|
|
1470
|
-
"password1": "password",
|
|
1471
|
-
"password2": "password",
|
|
1472
|
-
}
|
|
1473
1203
|
response = self.client.post(
|
|
1474
|
-
reverse("wagtailusers_users:edit", args=(self.test_user.pk,)),
|
|
1204
|
+
reverse("wagtailusers_users:edit", args=(self.test_user.pk,)),
|
|
1205
|
+
self.post_data,
|
|
1475
1206
|
)
|
|
1476
1207
|
|
|
1477
1208
|
self.assertEqual(response.status_code, 200)
|
|
@@ -1594,6 +1325,14 @@ class TestUserEditViewForNonSuperuser(WagtailTestUtils, TestCase):
|
|
|
1594
1325
|
"is_superuser": "on",
|
|
1595
1326
|
"is_active": "on",
|
|
1596
1327
|
}
|
|
1328
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
1329
|
+
post_data.update(
|
|
1330
|
+
{
|
|
1331
|
+
"country": "testcountry",
|
|
1332
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
1333
|
+
}
|
|
1334
|
+
)
|
|
1335
|
+
|
|
1597
1336
|
response = self.client.post(
|
|
1598
1337
|
reverse("wagtailusers_users:edit", args=(self.editor_user.pk,)), post_data
|
|
1599
1338
|
)
|
|
@@ -2722,65 +2461,104 @@ class TestGroupHistoryView(WagtailTestUtils, TestCase):
|
|
|
2722
2461
|
|
|
2723
2462
|
|
|
2724
2463
|
class TestGroupViewSet(TestCase):
|
|
2725
|
-
app_config_attr = "group_viewset"
|
|
2726
|
-
default_viewset_cls = GroupViewSet
|
|
2727
|
-
custom_viewset_cls = CustomGroupViewSet
|
|
2728
|
-
create_form_cls = CustomGroupForm
|
|
2729
|
-
edit_form_cls = CustomGroupForm
|
|
2730
|
-
|
|
2731
2464
|
def setUp(self):
|
|
2732
2465
|
self.app_config = apps.get_app_config("wagtailusers")
|
|
2466
|
+
self.app_config_class_name = self.app_config.__class__.__name__
|
|
2733
2467
|
|
|
2734
2468
|
def test_get_viewset_cls(self):
|
|
2735
2469
|
self.assertIs(
|
|
2736
|
-
get_viewset_cls(self.app_config,
|
|
2737
|
-
|
|
2470
|
+
get_viewset_cls(self.app_config, "group_viewset"),
|
|
2471
|
+
GroupViewSet,
|
|
2738
2472
|
)
|
|
2739
2473
|
|
|
2740
2474
|
def test_get_viewset_cls_with_custom_form(self):
|
|
2741
2475
|
with unittest.mock.patch.object(
|
|
2742
2476
|
self.app_config,
|
|
2743
|
-
|
|
2744
|
-
new=
|
|
2477
|
+
"group_viewset",
|
|
2478
|
+
new="wagtail.users.tests.CustomGroupViewSet",
|
|
2745
2479
|
):
|
|
2746
|
-
group_viewset = get_viewset_cls(self.app_config,
|
|
2747
|
-
self.assertIs(group_viewset,
|
|
2480
|
+
group_viewset = get_viewset_cls(self.app_config, "group_viewset")
|
|
2481
|
+
self.assertIs(group_viewset, CustomGroupViewSet)
|
|
2748
2482
|
self.assertEqual(group_viewset.icon, "custom-icon")
|
|
2749
2483
|
viewset = group_viewset()
|
|
2750
|
-
self.assertIs(viewset.get_form_class(for_update=False),
|
|
2751
|
-
self.assertIs(viewset.get_form_class(for_update=True),
|
|
2484
|
+
self.assertIs(viewset.get_form_class(for_update=False), CustomGroupForm)
|
|
2485
|
+
self.assertIs(viewset.get_form_class(for_update=True), CustomGroupForm)
|
|
2752
2486
|
|
|
2753
2487
|
def test_get_viewset_cls_custom_form_invalid_value(self):
|
|
2754
2488
|
with unittest.mock.patch.object(
|
|
2755
|
-
self.app_config,
|
|
2489
|
+
self.app_config, "group_viewset", new="asdfasdf"
|
|
2756
2490
|
):
|
|
2757
2491
|
with self.assertRaisesMessage(
|
|
2758
2492
|
ImproperlyConfigured,
|
|
2759
|
-
f"Invalid setting for
|
|
2493
|
+
f"Invalid setting for {self.app_config_class_name}.group_viewset: "
|
|
2760
2494
|
"asdfasdf doesn't look like a module path",
|
|
2761
2495
|
):
|
|
2762
|
-
get_viewset_cls(self.app_config,
|
|
2496
|
+
get_viewset_cls(self.app_config, "group_viewset")
|
|
2763
2497
|
|
|
2764
2498
|
def test_get_viewset_cls_custom_form_does_not_exist(self):
|
|
2765
2499
|
with unittest.mock.patch.object(
|
|
2766
2500
|
self.app_config,
|
|
2767
|
-
|
|
2501
|
+
"group_viewset",
|
|
2768
2502
|
new="wagtail.users.tests.CustomClassDoesNotExist",
|
|
2769
2503
|
):
|
|
2770
2504
|
with self.assertRaisesMessage(
|
|
2771
2505
|
ImproperlyConfigured,
|
|
2772
|
-
f"Invalid setting for
|
|
2506
|
+
f"Invalid setting for {self.app_config_class_name}.group_viewset: "
|
|
2773
2507
|
'Module "wagtail.users.tests" does not define a "CustomClassDoesNotExist" attribute/class',
|
|
2774
2508
|
):
|
|
2775
|
-
get_viewset_cls(self.app_config,
|
|
2509
|
+
get_viewset_cls(self.app_config, "group_viewset")
|
|
2510
|
+
|
|
2511
|
+
|
|
2512
|
+
class TestUserViewSet(TestCase):
|
|
2513
|
+
def setUp(self):
|
|
2514
|
+
self.app_config = apps.get_app_config("wagtailusers")
|
|
2515
|
+
self.app_config_class_name = self.app_config.__class__.__name__
|
|
2516
|
+
|
|
2517
|
+
@unittest.skipUnless(
|
|
2518
|
+
settings.AUTH_USER_MODEL == "emailuser.EmailUser",
|
|
2519
|
+
"Test only applies to EmailUser model",
|
|
2520
|
+
)
|
|
2521
|
+
def test_get_viewset_cls_default(self):
|
|
2522
|
+
self.assertIs(
|
|
2523
|
+
get_viewset_cls(self.app_config, "user_viewset"),
|
|
2524
|
+
UserViewSet,
|
|
2525
|
+
)
|
|
2526
|
+
|
|
2527
|
+
@unittest.skipUnless(
|
|
2528
|
+
settings.AUTH_USER_MODEL == "customuser.CustomUser",
|
|
2529
|
+
"Test only applies to CustomUser model",
|
|
2530
|
+
)
|
|
2531
|
+
def test_get_viewset_cls_custom(self):
|
|
2532
|
+
viewset_cls = get_viewset_cls(self.app_config, "user_viewset")
|
|
2533
|
+
self.assertIs(viewset_cls, CustomUserViewSet)
|
|
2534
|
+
self.assertEqual(viewset_cls.icon, "custom-icon")
|
|
2535
|
+
viewset = viewset_cls()
|
|
2536
|
+
self.assertIs(viewset.get_form_class(for_update=False), CustomUserCreationForm)
|
|
2537
|
+
self.assertIs(viewset.get_form_class(for_update=True), CustomUserEditForm)
|
|
2776
2538
|
|
|
2539
|
+
def test_get_viewset_cls_custom_form_invalid_value(self):
|
|
2540
|
+
with unittest.mock.patch.object(
|
|
2541
|
+
self.app_config, "user_viewset", new="asdfasdf"
|
|
2542
|
+
):
|
|
2543
|
+
with self.assertRaisesMessage(
|
|
2544
|
+
ImproperlyConfigured,
|
|
2545
|
+
f"Invalid setting for {self.app_config_class_name}.user_viewset: "
|
|
2546
|
+
"asdfasdf doesn't look like a module path",
|
|
2547
|
+
):
|
|
2548
|
+
get_viewset_cls(self.app_config, "user_viewset")
|
|
2777
2549
|
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2550
|
+
def test_get_viewset_cls_custom_form_does_not_exist(self):
|
|
2551
|
+
with unittest.mock.patch.object(
|
|
2552
|
+
self.app_config,
|
|
2553
|
+
"user_viewset",
|
|
2554
|
+
new="wagtail.users.tests.CustomClassDoesNotExist",
|
|
2555
|
+
):
|
|
2556
|
+
with self.assertRaisesMessage(
|
|
2557
|
+
ImproperlyConfigured,
|
|
2558
|
+
f"Invalid setting for {self.app_config_class_name}.user_viewset: "
|
|
2559
|
+
'Module "wagtail.users.tests" does not define a "CustomClassDoesNotExist" attribute/class',
|
|
2560
|
+
):
|
|
2561
|
+
get_viewset_cls(self.app_config, "user_viewset")
|
|
2784
2562
|
|
|
2785
2563
|
def test_registered_permissions(self):
|
|
2786
2564
|
group_ct = ContentType.objects.get_for_model(Group)
|
|
@@ -2831,6 +2609,21 @@ class TestAuthorisationCreateView(WagtailTestUtils, TestCase):
|
|
|
2831
2609
|
self._user = self.create_user(username="auth_user", password="password")
|
|
2832
2610
|
self._user.user_permissions.add(Permission.objects.get(codename="access_admin"))
|
|
2833
2611
|
self.login(username="auth_user", password="password")
|
|
2612
|
+
self.post_data = {
|
|
2613
|
+
"username": "testuser",
|
|
2614
|
+
"email": "test@user.com",
|
|
2615
|
+
"first_name": "Test",
|
|
2616
|
+
"last_name": "User",
|
|
2617
|
+
"password1": "password",
|
|
2618
|
+
"password2": "password",
|
|
2619
|
+
}
|
|
2620
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
2621
|
+
self.post_data.update(
|
|
2622
|
+
{
|
|
2623
|
+
"country": "testcountry",
|
|
2624
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
2625
|
+
}
|
|
2626
|
+
)
|
|
2834
2627
|
|
|
2835
2628
|
def get(self, params={}):
|
|
2836
2629
|
return self.client.get(reverse("wagtailusers_users:add"), params)
|
|
@@ -2862,16 +2655,7 @@ class TestAuthorisationCreateView(WagtailTestUtils, TestCase):
|
|
|
2862
2655
|
self.assertTemplateUsed(response, "wagtailusers/users/create.html")
|
|
2863
2656
|
|
|
2864
2657
|
def test_unauthorised_post(self):
|
|
2865
|
-
response = self.post(
|
|
2866
|
-
{
|
|
2867
|
-
"username": "testuser",
|
|
2868
|
-
"email": "test@user.com",
|
|
2869
|
-
"first_name": "Test",
|
|
2870
|
-
"last_name": "User",
|
|
2871
|
-
"password1": "password",
|
|
2872
|
-
"password2": "password",
|
|
2873
|
-
}
|
|
2874
|
-
)
|
|
2658
|
+
response = self.post(self.post_data)
|
|
2875
2659
|
# Should redirect to admin index (permission denied)
|
|
2876
2660
|
self.assertRedirects(response, reverse("wagtailadmin_home"))
|
|
2877
2661
|
self.assertEqual(
|
|
@@ -2883,16 +2667,7 @@ class TestAuthorisationCreateView(WagtailTestUtils, TestCase):
|
|
|
2883
2667
|
|
|
2884
2668
|
def test_authorised_post(self):
|
|
2885
2669
|
self.gain_permissions()
|
|
2886
|
-
response = self.post(
|
|
2887
|
-
{
|
|
2888
|
-
"username": "testuser",
|
|
2889
|
-
"email": "test@user.com",
|
|
2890
|
-
"first_name": "Test",
|
|
2891
|
-
"last_name": "User",
|
|
2892
|
-
"password1": "password",
|
|
2893
|
-
"password2": "password",
|
|
2894
|
-
}
|
|
2895
|
-
)
|
|
2670
|
+
response = self.post(self.post_data)
|
|
2896
2671
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
2897
2672
|
user = get_user_model().objects.filter(email="test@user.com")
|
|
2898
2673
|
self.assertTrue(user.exists())
|
|
@@ -2910,6 +2685,22 @@ class TestAuthorisationEditView(WagtailTestUtils, TestCase):
|
|
|
2910
2685
|
last_name="User",
|
|
2911
2686
|
password="password",
|
|
2912
2687
|
)
|
|
2688
|
+
self.post_data = {
|
|
2689
|
+
"username": "testuser",
|
|
2690
|
+
"email": "test@user.com",
|
|
2691
|
+
"first_name": "Edited",
|
|
2692
|
+
"last_name": "User",
|
|
2693
|
+
"password1": "newpassword",
|
|
2694
|
+
"password2": "newpassword",
|
|
2695
|
+
"is_active": "on",
|
|
2696
|
+
}
|
|
2697
|
+
if settings.AUTH_USER_MODEL == "customuser.CustomUser":
|
|
2698
|
+
self.post_data.update(
|
|
2699
|
+
{
|
|
2700
|
+
"country": "testcountry",
|
|
2701
|
+
"attachment": SimpleUploadedFile("test.txt", b"Uploaded file"),
|
|
2702
|
+
}
|
|
2703
|
+
)
|
|
2913
2704
|
|
|
2914
2705
|
def get(self, params={}, user_id=None):
|
|
2915
2706
|
return self.client.get(
|
|
@@ -2947,17 +2738,7 @@ class TestAuthorisationEditView(WagtailTestUtils, TestCase):
|
|
|
2947
2738
|
self.assertTemplateUsed(response, "wagtailusers/users/edit.html")
|
|
2948
2739
|
|
|
2949
2740
|
def test_unauthorised_post(self):
|
|
2950
|
-
response = self.post(
|
|
2951
|
-
{
|
|
2952
|
-
"username": "testuser",
|
|
2953
|
-
"email": "test@user.com",
|
|
2954
|
-
"first_name": "Edited",
|
|
2955
|
-
"last_name": "User",
|
|
2956
|
-
"password1": "newpassword",
|
|
2957
|
-
"password2": "newpassword",
|
|
2958
|
-
"is_active": "on",
|
|
2959
|
-
}
|
|
2960
|
-
)
|
|
2741
|
+
response = self.post(self.post_data)
|
|
2961
2742
|
# Should redirect to admin index (permission denied)
|
|
2962
2743
|
self.assertRedirects(response, reverse("wagtailadmin_home"))
|
|
2963
2744
|
self.assertEqual(
|
|
@@ -2970,17 +2751,7 @@ class TestAuthorisationEditView(WagtailTestUtils, TestCase):
|
|
|
2970
2751
|
|
|
2971
2752
|
def test_authorised_post(self):
|
|
2972
2753
|
self.gain_permissions()
|
|
2973
|
-
response = self.post(
|
|
2974
|
-
{
|
|
2975
|
-
"username": "testuser",
|
|
2976
|
-
"email": "test@user.com",
|
|
2977
|
-
"first_name": "Edited",
|
|
2978
|
-
"last_name": "User",
|
|
2979
|
-
"password1": "newpassword",
|
|
2980
|
-
"password2": "newpassword",
|
|
2981
|
-
"is_active": "on",
|
|
2982
|
-
}
|
|
2983
|
-
)
|
|
2754
|
+
response = self.post(self.post_data)
|
|
2984
2755
|
self.assertRedirects(response, reverse("wagtailusers_users:index"))
|
|
2985
2756
|
user = get_user_model().objects.get(pk=self.test_user.pk)
|
|
2986
2757
|
self.assertEqual(user.first_name, "Edited")
|
|
@@ -3050,103 +2821,6 @@ class TestAuthorisationDeleteView(WagtailTestUtils, TestCase):
|
|
|
3050
2821
|
self.assertFalse(user.exists())
|
|
3051
2822
|
|
|
3052
2823
|
|
|
3053
|
-
class TestTemplateTags(WagtailTestUtils, TestCase):
|
|
3054
|
-
@classmethod
|
|
3055
|
-
def setUpTestData(cls):
|
|
3056
|
-
cls.user = cls.create_superuser("admin")
|
|
3057
|
-
cls.request = get_dummy_request()
|
|
3058
|
-
cls.request.user = cls.user
|
|
3059
|
-
cls.test_user = cls.create_user(
|
|
3060
|
-
username="testuser",
|
|
3061
|
-
email="testuser@email.com",
|
|
3062
|
-
password="password",
|
|
3063
|
-
)
|
|
3064
|
-
|
|
3065
|
-
def test_user_listing_buttons(self):
|
|
3066
|
-
template = """
|
|
3067
|
-
{% load wagtailusers_tags %}
|
|
3068
|
-
{% for user in users %}
|
|
3069
|
-
<ul class="actions">
|
|
3070
|
-
{% user_listing_buttons user %}
|
|
3071
|
-
</ul>
|
|
3072
|
-
{% endfor %}
|
|
3073
|
-
"""
|
|
3074
|
-
|
|
3075
|
-
def hook(user, request_user):
|
|
3076
|
-
self.assertEqual(user, self.test_user)
|
|
3077
|
-
self.assertEqual(request_user, self.user)
|
|
3078
|
-
yield UserListingButton(
|
|
3079
|
-
"Show profile",
|
|
3080
|
-
f"/goes/to/a/url/{user.pk}",
|
|
3081
|
-
priority=30,
|
|
3082
|
-
)
|
|
3083
|
-
|
|
3084
|
-
with self.register_hook("register_user_listing_buttons", hook):
|
|
3085
|
-
with self.assertWarnsMessage(
|
|
3086
|
-
RemovedInWagtail70Warning,
|
|
3087
|
-
"`user_listing_buttons` template tag is deprecated.",
|
|
3088
|
-
):
|
|
3089
|
-
html = Template(template).render(
|
|
3090
|
-
RequestContext(self.request, {"users": [self.test_user]})
|
|
3091
|
-
)
|
|
3092
|
-
|
|
3093
|
-
soup = self.get_soup(html)
|
|
3094
|
-
|
|
3095
|
-
profile_url = f"/goes/to/a/url/{self.test_user.pk}"
|
|
3096
|
-
top_level_custom_button = soup.select_one(f"li > a[href='{profile_url}']")
|
|
3097
|
-
self.assertIsNotNone(top_level_custom_button)
|
|
3098
|
-
self.assertEqual(
|
|
3099
|
-
top_level_custom_button.text.strip(),
|
|
3100
|
-
"Show profile",
|
|
3101
|
-
)
|
|
3102
|
-
|
|
3103
|
-
def test_user_listing_buttons_with_deprecated_hook(self):
|
|
3104
|
-
template = """
|
|
3105
|
-
{% load wagtailusers_tags %}
|
|
3106
|
-
{% for user in users %}
|
|
3107
|
-
<ul class="actions">
|
|
3108
|
-
{% user_listing_buttons user %}
|
|
3109
|
-
</ul>
|
|
3110
|
-
{% endfor %}
|
|
3111
|
-
"""
|
|
3112
|
-
|
|
3113
|
-
def deprecated_hook(context, user):
|
|
3114
|
-
self.assertEqual(user, self.test_user)
|
|
3115
|
-
self.assertEqual(context.request.user, self.user)
|
|
3116
|
-
yield UserListingButton(
|
|
3117
|
-
"Show profile",
|
|
3118
|
-
f"/goes/to/a/url/{user.pk}",
|
|
3119
|
-
priority=30,
|
|
3120
|
-
)
|
|
3121
|
-
|
|
3122
|
-
with self.register_hook("register_user_listing_buttons", deprecated_hook):
|
|
3123
|
-
with self.assertWarns(RemovedInWagtail70Warning) as warning_manager:
|
|
3124
|
-
html = Template(template).render(
|
|
3125
|
-
RequestContext(self.request, {"users": [self.test_user]})
|
|
3126
|
-
)
|
|
3127
|
-
|
|
3128
|
-
self.assertEqual(
|
|
3129
|
-
[str(w.message) for w in warning_manager.warnings],
|
|
3130
|
-
[
|
|
3131
|
-
# Deprecation of the template tag
|
|
3132
|
-
"`user_listing_buttons` template tag is deprecated.",
|
|
3133
|
-
# Deprecation of the hook signature
|
|
3134
|
-
"`register_user_listing_buttons` hook functions should accept a "
|
|
3135
|
-
"`request_user` argument instead of `context` - "
|
|
3136
|
-
"wagtail.users.tests.test_admin_views.deprecated_hook needs to be updated",
|
|
3137
|
-
],
|
|
3138
|
-
)
|
|
3139
|
-
|
|
3140
|
-
soup = self.get_soup(html)
|
|
3141
|
-
profile_url = f"/goes/to/a/url/{self.test_user.pk}"
|
|
3142
|
-
top_level_custom_button = soup.select_one(f"li > a[href='{profile_url}']")
|
|
3143
|
-
self.assertIsNotNone(top_level_custom_button)
|
|
3144
|
-
self.assertEqual(
|
|
3145
|
-
top_level_custom_button.text.strip(),
|
|
3146
|
-
"Show profile",
|
|
3147
|
-
)
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
2824
|
class TestAdminPermissions(WagtailTestUtils, TestCase):
|
|
3151
2825
|
def test_registered_user_permissions(self):
|
|
3152
2826
|
user_ct = ContentType.objects.get_for_model(User)
|