0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00
Commit Graph

15230 Commits

Author SHA1 Message Date
Sage Abdullah
25ae75ab2f Allow template overrides from SnippetViewSet 2023-04-13 17:53:58 +01:00
Sage Abdullah
2bb0088f21 Pass viewset instance to all Snippets views 2023-04-13 17:53:58 +01:00
Sage Abdullah
b3a9c79f40 Rename Snippets type_index.html and results.html templates to index.html and index_results.html 2023-04-13 17:53:58 +01:00
Sage Abdullah
1992c72791 Add missing docs for chooser_viewset_class 2023-04-13 17:53:58 +01:00
Hanoon
70a6230a65 Migrate submit translation bulk toggle to Stimulus Controller (w-bulk)
- Closes #10247
- adding BulkController files and removing {% block extra_js %} from submit_translation.html
- add unit tests for new controller
- partial work on CSP compliance #7053
2023-04-13 22:28:17 +10:00
Matt Westcott
f88796b3dd Release note for #10208 2023-04-12 16:26:05 +01:00
Matt Westcott
b3b8af2cf6 Revert "Switch to real database backend for tests"
This reverts commit 024763c948.
2023-04-12 16:23:06 +01:00
Matt Westcott
601c59eef0 Use TransactionTestCase for snippet search tests 2023-04-12 16:22:56 +01:00
Matt Westcott
e1f4876ac6 Use TransactionTestCase for image model search tests 2023-04-12 16:03:54 +01:00
Matt Westcott
daf56028fe Use TransactionTestCase for image admin view search tests 2023-04-12 16:03:54 +01:00
Matt Westcott
d3503bfd5a Use TransactionTestCase for document model search tests 2023-04-12 16:03:54 +01:00
Matt Westcott
18e445c5f4 Use TransactionTestCase for simple modeladmin search test 2023-04-12 16:03:54 +01:00
Matt Westcott
706113c1e1 Use TransactionTestCase for TestChooserSearch in test_page_chooser 2023-04-12 16:03:54 +01:00
Matt Westcott
34876237c2 Use TransactionTestCase for page queryset search tests 2023-04-12 16:03:54 +01:00
Matt Westcott
f86666f5ef Use TransactionTestCase for document admin search tests 2023-04-12 16:03:54 +01:00
Matt Westcott
da171df2ce Use TransactionTestCase for page search tests 2023-04-12 16:03:54 +01:00
Matt Westcott
7d754d0fce Use TransactionTestCase for API search tests
This allows them to work against MySQL - FTS indexing only takes effect when the transaction is committed, so the regular TestCase class (which wraps the whole test in a transaction) cannot be used. This in turn requires the demosite.json fixture to be tweaked to explicitly set locale and collection.
2023-04-12 16:03:54 +01:00
Matt Westcott
ae89cd6b11 Fix annotate_score tests to test a real search, and run indexer 2023-04-12 16:03:54 +01:00
Matt Westcott
c281c4605b Fix snippet search tests to avoid searching on a stopword 2023-04-12 16:03:53 +01:00
Matt Westcott
d871cd4635 Disable order_by_relevance when testing custom ordering on search queries 2023-04-12 15:53:34 +01:00
Matt Westcott
dc08bca094 search for 'lord' instead of 'of' to avoid stopword removal 2023-04-12 15:53:34 +01:00
Matt Westcott
09d61cedcd Use more distinctive keywords in API search tests
searching on "elephant" instead of "again" will make it less susceptible to stopword removal
2023-04-12 15:53:34 +01:00
Matt Westcott
99b3813d6e Use the correct context variable for snippet chooser tests
'items' is only assigned within the results.html template, and only when results are non-empty, so if no results are returned we get a KeyError that obscures the real test failure
2023-04-12 15:53:34 +01:00
Matt Westcott
cee79201d3 Fix test for root appearing in search results
Search for 'root' so that it isn't dependent on partial matching, and run the indexer first
2023-04-12 15:53:34 +01:00
Matt Westcott
2f41de277d Switch to real database backend for tests 2023-04-12 15:53:34 +01:00
Matt Westcott
ca6732f569 When capturing deletion signals, don't assume objects have an id field
Deleting a model will delete its linked SQLiteFTSIndexEntry records, which use the OneToOneField index_entry as the primary key.
2023-04-12 15:53:34 +01:00
Matt Westcott
12e277a95c Update page chooser search tests to not rely on partial matching
except the one test that's actually testing partial matching
2023-04-12 15:53:34 +01:00
Matt Westcott
7f6d6c3477 Perform indexing before running API page search tests
This is required on search backends other than the fallback backend.
2023-04-12 15:53:34 +01:00
Matt Westcott
f83ba30c42 Change the "missing core fields in search_fields" test to check against TaggedPage instead of EventPage
wagtail.admin.tests.pages.test_page_search runs tests against SingleEventPage, and without those core fields in place there's no way to write tests that work on both the fallback backend (which ignores search_fields and only searches on core fields) and the real ones (which respect search_fields).
2023-04-12 15:53:34 +01:00
Matt Westcott
8d80c858d2 add a repr to MatchExpression to help with debugging 2023-04-12 15:53:34 +01:00
Matt Westcott
8cbff95a9c Rewrite test_search_searchable_fields to not hack search_fields on the fly
This is not expected to work on search backends that actually perform indexing (i.e. all of them except the fallback backend)
2023-04-12 15:53:34 +01:00
Thibaud Colas
574cc05d19 Release notes for #10278 2023-04-12 11:51:00 +01:00
Thibaud Colas
c2c37ab143 Update documentation referring to icon class names 2023-04-12 11:51:00 +01:00
Thibaud Colas
2ebf0de3fc Convert ModelAdmin icons to SVG 2023-04-12 11:51:00 +01:00
Thibaud Colas
5ffb48a015 Convert workflow and page listing icons to SVG 2023-04-12 11:51:00 +01:00
Thibaud Colas
b3ecfabf64 Earmark icon font setup scheduled for deletion in Wagtail 6.0 2023-04-12 11:51:00 +01:00
Matt Westcott
18e57574cb Formalise support for Django 4.2 2023-04-03 17:14:29 +02:00
Matt Westcott
e41035e298 Update latest.txt for 4.2.2 / 4.1.4 2023-04-03 14:30:24 +02:00
Matt Westcott
e219968e60 Fill in release date for 4.1.4 2023-04-03 12:41:18 +02:00
Matt Westcott
879295913a Fill in release date for 4.2.2 2023-04-03 12:41:18 +02:00
Matt Westcott
d4022310cb Release note for CVE-2023-28837 in 4.1.4 2023-04-03 12:41:18 +02:00
Matt Westcott
c9d2fcd650 Release note for CVE-2023-28837 in 4.2.2 2023-04-03 12:41:18 +02:00
Jake Howard
cfa11bbe00 Don't load temporary uploaded files into memory
These can be quite large. Instead pass them straight to Willow to have it read just as much as it needs to
2023-04-03 12:41:18 +02:00
Jake Howard
3c0c64642b Don't load images / documents into memory when calculating their hash
This can be done in chunks, which prevents crashes when uploading large files.
2023-04-03 12:41:18 +02:00
Matt Westcott
eefc3381d3 Release note for CVE-2023-28836 in 4.1.4 2023-04-03 12:41:18 +02:00
Matt Westcott
bc84bf9815 Release note for CVE-2023-28836 in 4.2.2 2023-04-03 12:41:18 +02:00
Thibaud Colas
158acef606 Change ModelAdmin InspectView to escape any HTML from document titles 2023-04-03 12:41:18 +02:00
Thibaud Colas
f033c9c490 Add new document field to Book model to test ModelAdmin features 2023-04-03 12:41:18 +02:00
Thibaud Colas
714147964a Change ChooseParentView to use plain text breadcrumbs for page titles, avoiding stored XSS vector 2023-04-03 11:13:03 +02:00
Matt Westcott
a3498b260f Release note for #10256 2023-04-03 10:24:30 +02:00