wagtail 7.1.1__py3-none-any.whl → 7.2rc1__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 +1 -1
- wagtail/actions/create_alias.py +1 -1
- wagtail/actions/delete_page.py +1 -1
- wagtail/actions/publish_page_revision.py +1 -1
- wagtail/actions/publish_revision.py +1 -1
- wagtail/actions/revert_to_page_revision.py +1 -1
- wagtail/actions/unpublish.py +1 -1
- wagtail/actions/unpublish_page.py +1 -1
- wagtail/admin/auth.py +3 -1
- wagtail/admin/checks.py +2 -2
- wagtail/admin/filters.py +28 -1
- wagtail/admin/forms/collections.py +1 -1
- wagtail/admin/forms/comments.py +1 -1
- wagtail/admin/forms/models.py +1 -1
- wagtail/admin/forms/pages.py +1 -1
- wagtail/admin/forms/tags.py +1 -1
- wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/cs/LC_MESSAGES/django.po +25 -1
- wagtail/admin/locale/en/LC_MESSAGES/django.po +278 -192
- wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +29 -15
- wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/it/LC_MESSAGES/django.po +3 -2
- wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/django.po +57 -3
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +8 -2
- wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ru/LC_MESSAGES/django.po +58 -1
- wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tr/LC_MESSAGES/django.po +3 -2
- wagtail/admin/static/wagtailadmin/css/core.css +1 -1
- wagtail/admin/static/wagtailadmin/js/bulk-actions.js +1 -1
- wagtail/admin/static/wagtailadmin/js/chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/chooser-widget-telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/chooser-widget.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/core.js.LICENSE.txt +2 -2
- wagtail/admin/static/wagtailadmin/js/date-time-chooser.js +1 -1
- wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
- wagtail/admin/static/wagtailadmin/js/filtered-select.js +1 -1
- wagtail/admin/static/wagtailadmin/js/icons.js +1 -1
- wagtail/admin/static/wagtailadmin/js/modal-workflow.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser-telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser.js +1 -1
- wagtail/admin/static/wagtailadmin/js/privacy-switch.js +1 -1
- wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/task-chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/task-chooser.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/widgets.js +1 -1
- wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +2 -2
- wagtail/admin/static/wagtailadmin/js/vendor/bootstrap-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/bootstrap-transition.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery-3.6.0.min.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery-ui-1.13.2.min.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.datetimepicker.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.fileupload-process.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.fileupload.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.iframe-transport.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/tag-it.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +1 -1
- wagtail/admin/static/wagtailadmin/js/wagtailadmin.js +1 -1
- wagtail/admin/static/wagtailadmin/js/workflow-action.js +1 -1
- wagtail/admin/templates/wagtailadmin/account/account.html +2 -0
- wagtail/admin/templates/wagtailadmin/base.html +14 -0
- wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html +2 -1
- wagtail/admin/templates/wagtailadmin/generic/chooser/creation_form.html +2 -1
- wagtail/admin/templates/wagtailadmin/generic/form.html +3 -1
- wagtail/admin/templates/wagtailadmin/panels/multi_field_panel_child.html +1 -1
- wagtail/admin/templates/wagtailadmin/panels/object_list.html +1 -1
- wagtail/admin/templates/wagtailadmin/panels/tabbed_interface.html +3 -2
- wagtail/admin/templates/wagtailadmin/shared/formatted_field.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/forms/single_checkbox.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/keyboard_shortcuts_dialog.html +19 -0
- wagtail/admin/templates/wagtailadmin/shared/panel.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/set_privacy.html +15 -0
- wagtail/admin/templates/wagtailadmin/shared/side_panels/checks.html +28 -1
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/detail.html +2 -2
- wagtail/admin/templates/wagtailadmin/{pages/listing/_ordering_header.html → tables/ordering_header.html} +2 -2
- wagtail/admin/templates/wagtailadmin/tables/title_cell.html +1 -1
- wagtail/admin/templates/wagtailadmin/userbar/base.html +6 -3
- wagtail/admin/templates/wagtailadmin/userbar/item_admin.html +2 -2
- wagtail/admin/templates/wagtailadmin/userbar/item_page_add.html +2 -2
- wagtail/admin/templates/wagtailadmin/userbar/item_page_edit.html +2 -2
- wagtail/admin/templates/wagtailadmin/userbar/item_page_explore.html +2 -2
- wagtail/admin/templates/wagtailadmin/widgets/{daterange_input.html → range_input.html} +1 -1
- wagtail/admin/templates/wagtailadmin/workflows/task_chooser/chooser.html +4 -2
- wagtail/admin/templatetags/wagtailadmin_tags.py +56 -22
- wagtail/admin/tests/api/test_pages.py +7 -7
- wagtail/admin/tests/api/test_renderer_classes.py +16 -0
- wagtail/admin/tests/pages/test_create_page.py +34 -2
- wagtail/admin/tests/pages/test_edit_page.py +128 -14
- wagtail/admin/tests/pages/test_explorer_view.py +34 -7
- wagtail/admin/tests/pages/test_reorder_page.py +11 -0
- wagtail/admin/tests/test_collections_views.py +12 -0
- wagtail/admin/tests/test_edit_handlers.py +3 -3
- wagtail/admin/tests/test_filters.py +2 -2
- wagtail/admin/tests/test_keyboard_shortcuts.py +52 -2
- wagtail/admin/tests/test_menu.py +0 -2
- wagtail/admin/tests/test_privacy.py +16 -16
- wagtail/admin/tests/test_templatetags.py +137 -0
- wagtail/admin/tests/test_userbar.py +75 -35
- wagtail/admin/tests/test_views_generic.py +34 -0
- wagtail/admin/tests/test_workflows.py +34 -0
- wagtail/admin/tests/viewsets/test_model_viewset.py +322 -0
- wagtail/admin/ui/tables/orderable.py +73 -0
- wagtail/admin/ui/tables/pages.py +3 -13
- wagtail/admin/userbar.py +6 -1
- wagtail/admin/views/collection_privacy.py +6 -2
- wagtail/admin/views/generic/__init__.py +1 -0
- wagtail/admin/views/generic/mixins.py +20 -2
- wagtail/admin/views/generic/models.py +67 -1
- wagtail/admin/views/generic/ordering.py +79 -0
- wagtail/admin/views/home.py +3 -3
- wagtail/admin/views/page_privacy.py +5 -2
- wagtail/admin/views/pages/create.py +1 -1
- wagtail/admin/views/pages/edit.py +2 -2
- wagtail/admin/views/pages/listing.py +7 -42
- wagtail/admin/views/pages/move.py +1 -1
- wagtail/admin/views/pages/ordering.py +1 -1
- wagtail/admin/viewsets/base.py +1 -1
- wagtail/admin/viewsets/model.py +49 -1
- wagtail/admin/wagtail_hooks.py +2 -1
- wagtail/admin/widgets/slug.py +10 -10
- wagtail/api/v2/serializers.py +1 -1
- wagtail/api/v2/tests/test_renderer_classes.py +32 -0
- wagtail/apps.py +2 -0
- wagtail/bin/wagtail.py +1 -1
- wagtail/blocks/struct_block.py +2 -1
- wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +14 -14
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +19 -2
- wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +18 -1
- wagtail/contrib/frontend_cache/tests.py +4 -2
- wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +4 -4
- wagtail/contrib/redirects/tests/test_tmp_storages.py +20 -0
- wagtail/contrib/redirects/tmp_storages.py +1 -1
- wagtail/contrib/redirects/views.py +3 -3
- wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +3 -3
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +43 -3
- wagtail/contrib/search_promotions/static/wagtailsearchpromotions/js/query-chooser-modal.js +1 -1
- wagtail/contrib/search_promotions/views/settings.py +2 -2
- wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.po +6 -1
- wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.po +6 -2
- wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.po +6 -1
- wagtail/contrib/settings/tests/site_specific/test_admin.py +40 -6
- wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/templates/wagtailstyleguide/base.html +5 -5
- wagtail/contrib/table_block/blocks.py +1 -0
- wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +5 -1
- wagtail/contrib/table_block/static/table_block/js/table.js +1 -1
- wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/static/typed_table_block/js/typed_table_block.js +1 -1
- wagtail/coreutils.py +5 -5
- wagtail/documents/forms.py +18 -1
- wagtail/documents/locale/en/LC_MESSAGES/django.po +10 -10
- wagtail/documents/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/nl/LC_MESSAGES/django.po +9 -0
- wagtail/documents/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ru/LC_MESSAGES/django.po +9 -0
- wagtail/documents/models.py +1 -1
- wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
- wagtail/documents/static/wagtaildocs/js/document-chooser-modal.js +1 -1
- wagtail/documents/static/wagtaildocs/js/document-chooser-telepath.js +1 -1
- wagtail/documents/static/wagtaildocs/js/document-chooser.js +1 -1
- wagtail/documents/templates/wagtaildocs/documents/add.html +0 -34
- wagtail/documents/tests/test_admin_views.py +132 -26
- wagtail/documents/tests/test_collection_privacy.py +18 -4
- wagtail/documents/tests/test_form_overrides.py +1 -1
- wagtail/documents/tests/test_search.py +21 -8
- wagtail/documents/views/documents.py +1 -1
- wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/static/wagtailembeds/js/embed-chooser-modal.js +1 -1
- wagtail/images/forms.py +16 -1
- wagtail/images/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/cs/LC_MESSAGES/django.po +12 -1
- wagtail/images/locale/en/LC_MESSAGES/django.po +57 -46
- wagtail/images/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/nl/LC_MESSAGES/django.po +37 -14
- wagtail/images/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ru/LC_MESSAGES/django.po +20 -1
- wagtail/images/models.py +1 -1
- wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
- wagtail/images/static/wagtailimages/js/focal-point-chooser.js +1 -1
- wagtail/images/static/wagtailimages/js/image-block.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser-modal.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser-telepath.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser.js +1 -1
- wagtail/images/static/wagtailimages/js/image-url-generator.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.Jcrop.min.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-image.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-validate.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/load-image.min.js +1 -1
- wagtail/images/templates/wagtailimages/chooser/chooser.html +22 -13
- wagtail/images/templates/wagtailimages/chooser/image_preview_column_cell.html +10 -0
- wagtail/images/templates/wagtailimages/chooser/results.html +24 -20
- wagtail/images/templates/wagtailimages/chooser/title_column_cell.html +15 -0
- wagtail/images/templates/wagtailimages/images/add.html +0 -34
- wagtail/images/templates/wagtailimages/images/index.html +3 -3
- wagtail/images/templates/wagtailimages/images/index_results.html +1 -1
- wagtail/images/templates/wagtailimages/images/layout_toggle_button.html +8 -7
- wagtail/images/templatetags/wagtailimages_tags.py +2 -2
- wagtail/images/tests/test_admin_views.py +87 -0
- wagtail/images/tests/test_form_overrides.py +1 -1
- wagtail/images/tests/test_models.py +48 -9
- wagtail/images/views/chooser.py +66 -2
- wagtail/locale/en/LC_MESSAGES/django.po +55 -55
- wagtail/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/is_IS/LC_MESSAGES/django.po +3 -3
- wagtail/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/nl/LC_MESSAGES/django.po +11 -2
- wagtail/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ru/LC_MESSAGES/django.po +11 -1
- wagtail/locales/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/nl/LC_MESSAGES/django.po +12 -1
- wagtail/locales/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/ru/LC_MESSAGES/django.po +10 -1
- wagtail/locales/views.py +2 -2
- wagtail/models/orderable.py +10 -0
- wagtail/models/pages.py +9 -11
- wagtail/models/sites.py +1 -1
- wagtail/models/workflows.py +8 -5
- wagtail/project_template/home/tests.py +6 -7
- wagtail/project_template/project_name/settings/base.py +9 -9
- wagtail/project_template/requirements.txt +1 -1
- wagtail/query.py +7 -2
- wagtail/rich_text/rewriters.py +1 -1
- wagtail/search/apps.py +4 -49
- wagtail/search/backends/__init__.py +1 -113
- wagtail/search/backends/base.py +1 -547
- wagtail/search/backends/database/__init__.py +1 -50
- wagtail/search/backends/database/fallback.py +1 -253
- wagtail/search/backends/database/mysql/mysql.py +1 -700
- wagtail/search/backends/database/mysql/query.py +1 -258
- wagtail/search/backends/database/postgres/postgres.py +1 -749
- wagtail/search/backends/database/postgres/query.py +1 -83
- wagtail/search/backends/database/postgres/weights.py +1 -63
- wagtail/search/backends/database/sqlite/query.py +1 -294
- wagtail/search/backends/database/sqlite/sqlite.py +1 -719
- wagtail/search/backends/database/sqlite/utils.py +1 -35
- wagtail/search/backends/deprecation.py +45 -0
- wagtail/search/backends/elasticsearch7.py +18 -1260
- wagtail/search/backends/elasticsearch8.py +21 -96
- wagtail/search/backends/elasticsearch9.py +35 -0
- wagtail/search/backends/opensearch2.py +35 -0
- wagtail/search/backends/opensearch3.py +35 -0
- wagtail/search/index.py +1 -358
- wagtail/search/locale/en/LC_MESSAGES/django.po +2 -10
- wagtail/search/management/commands/update_index.py +1 -205
- wagtail/search/management/commands/wagtail_update_index.py +1 -4
- wagtail/search/models.py +32 -158
- wagtail/search/query.py +1 -114
- wagtail/search/queryset.py +1 -43
- wagtail/search/signal_handlers.py +1 -24
- wagtail/search/tasks.py +1 -10
- wagtail/search/tests/test_elasticsearch.py +22 -0
- wagtail/search/utils.py +1 -206
- wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/en/LC_MESSAGES/django.po +3 -3
- wagtail/snippets/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/ru/LC_MESSAGES/django.po +8 -1
- wagtail/snippets/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/tr/LC_MESSAGES/django.po +8 -1
- wagtail/snippets/static/wagtailsnippets/js/snippet-chooser-telepath.js +1 -1
- wagtail/snippets/static/wagtailsnippets/js/snippet-chooser.js +1 -1
- wagtail/snippets/tests/test_preview.py +5 -6
- wagtail/snippets/tests/test_reordering.py +319 -0
- wagtail/snippets/tests/test_snippets.py +65 -12
- wagtail/snippets/views/snippets.py +16 -0
- wagtail/test/numberformat.py +30 -0
- wagtail/test/settings.py +35 -12
- wagtail/test/testapp/fields.py +12 -0
- wagtail/test/testapp/migrations/0056_commentablejsonpage.py +50 -0
- wagtail/test/testapp/migrations/0057_featurecompletetoy_sort_order.py +23 -0
- wagtail/test/testapp/migrations/0058_customlocktask.py +31 -0
- wagtail/test/testapp/models.py +27 -0
- wagtail/test/testapp/urls.py +1 -0
- wagtail/test/testapp/views.py +18 -2
- wagtail/test/utils/page_tests.py +17 -17
- wagtail/test/utils/template_tests.py +4 -6
- wagtail/test/utils/wagtail_tests.py +1 -2
- wagtail/tests/test_blocks.py +15 -0
- wagtail/tests/test_page_model.py +15 -0
- wagtail/{search/tests → tests}/test_page_search.py +29 -2
- wagtail/tests/test_search_fields.py +69 -0
- wagtail/tests/test_tests.py +62 -6
- wagtail/tests/test_workflow.py +25 -1
- wagtail/users/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/cs/LC_MESSAGES/django.po +3 -0
- wagtail/users/locale/en/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/nl/LC_MESSAGES/django.po +6 -3
- wagtail/users/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/ru/LC_MESSAGES/django.po +5 -1
- wagtail/users/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/tr/LC_MESSAGES/django.po +78 -4
- wagtail/users/templates/wagtailusers/users/create.html +2 -0
- wagtail/users/templates/wagtailusers/users/edit.html +2 -0
- wagtail/users/tests/test_admin_views.py +4 -0
- wagtail/users/views/users.py +1 -1
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/METADATA +7 -6
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/RECORD +322 -328
- wagtail/admin/templates/wagtailadmin/collection_privacy/set_privacy.html +0 -13
- wagtail/admin/templates/wagtailadmin/page_privacy/set_privacy.html +0 -13
- wagtail/search/tests/__init__.py +0 -0
- wagtail/search/tests/elasticsearch_common_tests.py +0 -251
- wagtail/search/tests/test_backends.py +0 -1215
- wagtail/search/tests/test_db_backend.py +0 -62
- wagtail/search/tests/test_elasticsearch7_backend.py +0 -1452
- wagtail/search/tests/test_elasticsearch8_backend.py +0 -15
- wagtail/search/tests/test_index_functions.py +0 -256
- wagtail/search/tests/test_indexed_class.py +0 -157
- wagtail/search/tests/test_mysql_backend.py +0 -192
- wagtail/search/tests/test_postgres_backend.py +0 -210
- wagtail/search/tests/test_queries.py +0 -332
- wagtail/search/tests/test_related_fields.py +0 -102
- wagtail/search/tests/test_sqlite_backend.py +0 -52
- wagtail/test/search/__init__.py +0 -0
- wagtail/test/search/apps.py +0 -9
- wagtail/test/search/fixtures/search.json +0 -545
- wagtail/test/search/migrations/0001_initial.py +0 -146
- wagtail/test/search/migrations/0002_bookunindexed.py +0 -43
- wagtail/test/search/migrations/0003_book_summary.py +0 -18
- wagtail/test/search/migrations/__init__.py +0 -0
- wagtail/test/search/models.py +0 -137
- /wagtail/admin/templates/wagtailadmin/{pages/listing/_ordering_cell.html → tables/ordering_cell.html} +0 -0
- /wagtail/{search/checks.py → checks.py} +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/WHEEL +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/entry_points.txt +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/licenses/LICENSE +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/top_level.txt +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{% load i18n wagtailadmin_tags %}
|
|
2
|
-
|
|
3
|
-
<form action="{% url 'wagtailadmin_collections:set_privacy' collection.id %}" method="POST" novalidate>
|
|
4
|
-
{% csrf_token %}
|
|
5
|
-
{% formattedfield field=form.restriction_type show_label=False %}
|
|
6
|
-
{% if form.password is not None %}
|
|
7
|
-
{% formattedfield form.password %}
|
|
8
|
-
{% endif %}
|
|
9
|
-
<div id="groups-fields">
|
|
10
|
-
{% formattedfield form.groups %}
|
|
11
|
-
</div>
|
|
12
|
-
<input type="submit" value="{% trans "Save" %}" class="button" />
|
|
13
|
-
</form>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{% load i18n wagtailadmin_tags %}
|
|
2
|
-
|
|
3
|
-
<form action="{% url 'wagtailadmin_pages:set_privacy' page.id %}" method="POST" novalidate>
|
|
4
|
-
{% csrf_token %}
|
|
5
|
-
{% formattedfield field=form.restriction_type show_label=False %}
|
|
6
|
-
{% if form.password is not None %}
|
|
7
|
-
{% formattedfield form.password %}
|
|
8
|
-
{% endif %}
|
|
9
|
-
<div id="groups-fields">
|
|
10
|
-
{% formattedfield form.groups %}
|
|
11
|
-
</div>
|
|
12
|
-
<input type="submit" value="{% trans "Save" %}" class="button" />
|
|
13
|
-
</form>
|
wagtail/search/tests/__init__.py
DELETED
|
File without changes
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
from datetime import date
|
|
2
|
-
from io import StringIO
|
|
3
|
-
|
|
4
|
-
from django.core import management
|
|
5
|
-
|
|
6
|
-
from wagtail.search.query import MATCH_ALL
|
|
7
|
-
from wagtail.search.tests.test_backends import BackendTests
|
|
8
|
-
from wagtail.test.search import models
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class ElasticsearchCommonSearchBackendTests(BackendTests):
|
|
12
|
-
def test_search_with_spaces_only(self):
|
|
13
|
-
# Search for some space characters and hope it doesn't crash
|
|
14
|
-
results = self.backend.search(" ", models.Book)
|
|
15
|
-
|
|
16
|
-
# Queries are lazily evaluated, force it to run
|
|
17
|
-
list(results)
|
|
18
|
-
|
|
19
|
-
# Didn't crash, yay!
|
|
20
|
-
|
|
21
|
-
def test_filter_with_unsupported_lookup_type(self):
|
|
22
|
-
"""
|
|
23
|
-
Not all lookup types are supported by the Elasticsearch backends
|
|
24
|
-
"""
|
|
25
|
-
from wagtail.search.backends.base import FilterError
|
|
26
|
-
|
|
27
|
-
with self.assertRaises(FilterError):
|
|
28
|
-
list(
|
|
29
|
-
self.backend.search(
|
|
30
|
-
"Hello", models.Book.objects.filter(title__iregex="h(ea)llo")
|
|
31
|
-
)
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
def test_partial_search(self):
|
|
35
|
-
results = self.backend.autocomplete("Java", models.Book)
|
|
36
|
-
|
|
37
|
-
self.assertUnsortedListEqual(
|
|
38
|
-
[r.title for r in results],
|
|
39
|
-
["JavaScript: The Definitive Guide", "JavaScript: The good parts"],
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
def test_disabled_partial_search(self):
|
|
43
|
-
results = self.backend.search("Java", models.Book)
|
|
44
|
-
|
|
45
|
-
self.assertUnsortedListEqual([r.title for r in results], [])
|
|
46
|
-
|
|
47
|
-
def test_disabled_partial_search_with_whole_term(self):
|
|
48
|
-
# Making sure that there isn't a different reason why the above test
|
|
49
|
-
# returned no results
|
|
50
|
-
results = self.backend.search("JavaScript", models.Book)
|
|
51
|
-
|
|
52
|
-
self.assertUnsortedListEqual(
|
|
53
|
-
[r.title for r in results],
|
|
54
|
-
["JavaScript: The Definitive Guide", "JavaScript: The good parts"],
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
def test_child_partial_search(self):
|
|
58
|
-
# Note: Expands to "Westeros". Which is in a field on Novel.setting
|
|
59
|
-
results = self.backend.autocomplete("Wes", models.Book)
|
|
60
|
-
|
|
61
|
-
self.assertUnsortedListEqual(
|
|
62
|
-
[r.title for r in results],
|
|
63
|
-
["A Game of Thrones", "A Storm of Swords", "A Clash of Kings"],
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
def test_ascii_folding(self):
|
|
67
|
-
book = models.Book.objects.create(
|
|
68
|
-
title="Ĥéllø", publication_date=date(2017, 10, 19), number_of_pages=1
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
index = self.backend.get_index_for_model(models.Book)
|
|
72
|
-
index.add_item(book)
|
|
73
|
-
index.refresh()
|
|
74
|
-
|
|
75
|
-
results = self.backend.autocomplete("Hello", models.Book)
|
|
76
|
-
|
|
77
|
-
self.assertUnsortedListEqual([r.title for r in results], ["Ĥéllø"])
|
|
78
|
-
|
|
79
|
-
def test_query_analyser(self):
|
|
80
|
-
# This is testing that fields that use edgengram_analyzer as their index analyser do not
|
|
81
|
-
# have it also as their query analyser
|
|
82
|
-
results = self.backend.search("JavaScript", models.Book)
|
|
83
|
-
self.assertUnsortedListEqual(
|
|
84
|
-
[r.title for r in results],
|
|
85
|
-
["JavaScript: The Definitive Guide", "JavaScript: The good parts"],
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
# Even though they both start with "Java", this should not match the "JavaScript" books
|
|
89
|
-
results = self.backend.search("JavaBeans", models.Book)
|
|
90
|
-
self.assertSetEqual({r.title for r in results}, set())
|
|
91
|
-
|
|
92
|
-
def test_search_with_hyphen(self):
|
|
93
|
-
"""
|
|
94
|
-
This tests that punctuation characters are treated the same
|
|
95
|
-
way in both indexing and querying.
|
|
96
|
-
|
|
97
|
-
See: https://github.com/wagtail/wagtail/issues/937
|
|
98
|
-
"""
|
|
99
|
-
book = models.Book.objects.create(
|
|
100
|
-
title="Harry Potter and the Half-Blood Prince",
|
|
101
|
-
publication_date=date(2009, 7, 15),
|
|
102
|
-
number_of_pages=607,
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
index = self.backend.get_index_for_model(models.Book)
|
|
106
|
-
index.add_item(book)
|
|
107
|
-
index.refresh()
|
|
108
|
-
|
|
109
|
-
results = self.backend.search("Half-Blood", models.Book)
|
|
110
|
-
self.assertUnsortedListEqual(
|
|
111
|
-
[r.title for r in results],
|
|
112
|
-
[
|
|
113
|
-
"Harry Potter and the Half-Blood Prince",
|
|
114
|
-
],
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
def test_search_with_numeric_term(self):
|
|
118
|
-
book = models.Book.objects.create(
|
|
119
|
-
title="Harry Potter and the 31337 Goblets of Fire",
|
|
120
|
-
publication_date=date(2009, 7, 15),
|
|
121
|
-
number_of_pages=607,
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
index = self.backend.get_index_for_model(models.Book)
|
|
125
|
-
index.add_item(book)
|
|
126
|
-
index.refresh()
|
|
127
|
-
|
|
128
|
-
results = self.backend.search("31337", models.Book)
|
|
129
|
-
self.assertUnsortedListEqual(
|
|
130
|
-
[r.title for r in results],
|
|
131
|
-
[
|
|
132
|
-
"Harry Potter and the 31337 Goblets of Fire",
|
|
133
|
-
],
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
results = self.backend.autocomplete("313", models.Book)
|
|
137
|
-
self.assertUnsortedListEqual(
|
|
138
|
-
[r.title for r in results],
|
|
139
|
-
[
|
|
140
|
-
"Harry Potter and the 31337 Goblets of Fire",
|
|
141
|
-
],
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
results = self.backend.search("31337 goblets", models.Book)
|
|
145
|
-
self.assertUnsortedListEqual(
|
|
146
|
-
[r.title for r in results],
|
|
147
|
-
[
|
|
148
|
-
"Harry Potter and the 31337 Goblets of Fire",
|
|
149
|
-
],
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
results = self.backend.autocomplete("31337 gob", models.Book)
|
|
153
|
-
self.assertUnsortedListEqual(
|
|
154
|
-
[r.title for r in results],
|
|
155
|
-
[
|
|
156
|
-
"Harry Potter and the 31337 Goblets of Fire",
|
|
157
|
-
],
|
|
158
|
-
)
|
|
159
|
-
|
|
160
|
-
def test_and_operator_with_single_field(self):
|
|
161
|
-
# Testing for bug #1859
|
|
162
|
-
results = self.backend.search(
|
|
163
|
-
"JavaScript", models.Book, operator="and", fields=["title"]
|
|
164
|
-
)
|
|
165
|
-
self.assertUnsortedListEqual(
|
|
166
|
-
[r.title for r in results],
|
|
167
|
-
["JavaScript: The Definitive Guide", "JavaScript: The good parts"],
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
def test_update_index_command_schema_only(self):
|
|
171
|
-
management.call_command(
|
|
172
|
-
"update_index",
|
|
173
|
-
backend_name=self.backend_name,
|
|
174
|
-
schema_only=True,
|
|
175
|
-
stdout=StringIO(),
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
# This should not give any results
|
|
179
|
-
results = self.backend.search(MATCH_ALL, models.Book)
|
|
180
|
-
self.assertSetEqual(set(results), set())
|
|
181
|
-
|
|
182
|
-
def test_more_than_ten_results(self):
|
|
183
|
-
# #3431 reported that Elasticsearch only sends back 10 results if the results set is not sliced
|
|
184
|
-
results = self.backend.search(MATCH_ALL, models.Book)
|
|
185
|
-
|
|
186
|
-
self.assertEqual(len(results), 14)
|
|
187
|
-
|
|
188
|
-
def test_more_than_one_hundred_results(self):
|
|
189
|
-
# Tests that fetching more than 100 results uses the scroll API
|
|
190
|
-
books = []
|
|
191
|
-
for i in range(150):
|
|
192
|
-
books.append(
|
|
193
|
-
models.Book.objects.create(
|
|
194
|
-
title=f"Book {i}",
|
|
195
|
-
publication_date=date(2017, 10, 21),
|
|
196
|
-
number_of_pages=i,
|
|
197
|
-
)
|
|
198
|
-
)
|
|
199
|
-
|
|
200
|
-
index = self.backend.get_index_for_model(models.Book)
|
|
201
|
-
index.add_items(models.Book, books)
|
|
202
|
-
index.refresh()
|
|
203
|
-
|
|
204
|
-
results = self.backend.search(MATCH_ALL, models.Book)
|
|
205
|
-
self.assertEqual(len(results), 164)
|
|
206
|
-
|
|
207
|
-
def test_slice_more_than_one_hundred_results(self):
|
|
208
|
-
books = []
|
|
209
|
-
for i in range(150):
|
|
210
|
-
books.append(
|
|
211
|
-
models.Book.objects.create(
|
|
212
|
-
title=f"Book {i}",
|
|
213
|
-
publication_date=date(2017, 10, 21),
|
|
214
|
-
number_of_pages=i,
|
|
215
|
-
)
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
index = self.backend.get_index_for_model(models.Book)
|
|
219
|
-
index.add_items(models.Book, books)
|
|
220
|
-
index.refresh()
|
|
221
|
-
|
|
222
|
-
results = self.backend.search(MATCH_ALL, models.Book)[10:120]
|
|
223
|
-
self.assertEqual(len(results), 110)
|
|
224
|
-
|
|
225
|
-
def test_slice_to_next_page(self):
|
|
226
|
-
# ES scroll API doesn't support offset. The implementation has an optimisation
|
|
227
|
-
# which will skip the first page if the first result is on the second page
|
|
228
|
-
books = []
|
|
229
|
-
for i in range(150):
|
|
230
|
-
books.append(
|
|
231
|
-
models.Book.objects.create(
|
|
232
|
-
title=f"Book {i}",
|
|
233
|
-
publication_date=date(2017, 10, 21),
|
|
234
|
-
number_of_pages=i,
|
|
235
|
-
)
|
|
236
|
-
)
|
|
237
|
-
|
|
238
|
-
index = self.backend.get_index_for_model(models.Book)
|
|
239
|
-
index.add_items(models.Book, books)
|
|
240
|
-
index.refresh()
|
|
241
|
-
|
|
242
|
-
results = self.backend.search(MATCH_ALL, models.Book)[110:]
|
|
243
|
-
self.assertEqual(len(results), 54)
|
|
244
|
-
|
|
245
|
-
def test_cannot_filter_on_date_parts_other_than_year(self):
|
|
246
|
-
# Filtering by date not supported, should throw a FilterError
|
|
247
|
-
from wagtail.search.backends.base import FilterError
|
|
248
|
-
|
|
249
|
-
in_jan = models.Book.objects.filter(publication_date__month=1)
|
|
250
|
-
with self.assertRaises(FilterError):
|
|
251
|
-
self.backend.search(MATCH_ALL, in_jan)
|