Matt Westcott
ccf4227af1
Don't add _all_text fields to remapped_fields if explicit fields are specified
...
Also fix previously-masked issues with _compile_fuzzy_query - pass field boost, and use field_name as key instead of the Field object
2023-11-15 13:13:59 +00:00
Matt Westcott
1e964c1a22
Initialise individual Fields with the correct boost values
2023-11-15 13:13:59 +00:00
Matt Westcott
947c1c3491
Move ES5->ES6 remapped_field tweaks out of __init__ and into _remap_fields
2023-11-15 13:13:59 +00:00
Matt Westcott
8e65ff5b0a
Split out a _remap_fields method
2023-11-15 13:13:59 +00:00
Matt Westcott
a1bde7ef6c
Use a 'boost' field in match query clauses instead of "foo^2" notation
...
The latter notation is only valid within multi_match clauses: compare https://www.elastic.co/guide/en/elasticsearch/reference/8.11/query-dsl-multi-match-query.html#field-boost versus https://www.elastic.co/guide/en/elasticsearch/reference/8.11/query-dsl-match-query.html#match-field-params
2023-11-15 13:13:59 +00:00
Matt Westcott
f917c0dc53
Make field_name_with_boost a property of the Field object rather than having a get_boosted_fields helper function
2023-11-15 13:13:59 +00:00
Matt Westcott
4e6575e4c4
Only consider subclasses of the currently-queried model when compiling unique_boosts
...
At indexing time, any SearchFields with a boost value assigned are copied to an index field named "_all_text_boost_{value}". Then, when querying, we compile a list of all such index fields and query on those fields, with the relevant boost applied to each one.
Previously, "all such index fields" was obtained by looking at distinct boost values across all indexed models. However, we only really need to consider models that can actually appear in the results - i.e. are subclasses of self.queryset.model. If a boost value does not appear among this set of models, then these models will never contribute anything to that "_all_text_boost_{value}" index field, and so it's pointless to query it.
2023-11-15 13:13:59 +00:00
Sage Abdullah
4c057f0069
Use doseq=True when re-encoding query params in set_query_params
...
Otherwise, the list of values will be stringified and then URL encoded, resulting in something like locale=%5B%27en%27%5D
From parse_qs docs: Use the urllib.parse.urlencode() function (with the doseq parameter set to True) to convert such dictionaries into query strings.
2023-11-14 15:41:47 +00:00
Matt Westcott
7194b6c837
Release note for #11223 in 5.2.1
2023-11-14 12:09:56 +00:00
Alex Tomkins
136bf4adc0
Fix performance regression for report views
2023-11-14 12:04:56 +00:00
Sage Abdullah
5452d62feb
Release notes for #11232
2023-11-14 11:01:22 +00:00
Sage Abdullah
762293a8ca
Consistently and safely set locale params in generic views
2023-11-14 11:01:22 +00:00
Sage Abdullah
0fbbd9322b
Create set_query_params util function
2023-11-14 11:01:21 +00:00
Matt Westcott
83914ed4c1
Release note for #11226 in 5.2.1
2023-11-13 09:04:06 +00:00
Joshua Munn
c36cf20dd4
Skip feature detection if image is an SVG
...
Fixes https://github.com/wagtail/wagtail/issues/11172
2023-11-13 08:59:18 +00:00
Sage Abdullah
1a4595b60b
Fix crash when accessing the history view for a translatable snippet
...
Regression in dc049cd880
.
2023-11-09 12:09:25 +00:00
Matt Westcott
5cf37f3a9d
Ensure that explorer_results views fill in the correct next_url parameter on action URLs
...
Fixes #11177 , by adding the option to pass an actions_next_url argument to the table as per https://github.com/wagtail/wagtail/pull/11175#discussion_r1381892130
2023-11-08 15:47:16 +00:00
varun kumar
e1cf4948d8
Use logical OR operator to combine search fields for Django ORM in IndexView
2023-11-08 15:41:39 +00:00
rohitsrma
42eb8ad82f
Ensure updated comments notifications (text) render unescaped strings #11147
...
Fixes #11143
# Conflicts:
# CHANGELOG.txt
# docs/releases/6.0.md
2023-11-07 08:40:26 +10:00
Matt Westcott
21b9881da6
Remove search logging from project template #11190
...
The search view on the project template is still attempting to log queries against the now-removed wagtailsearch.Query model - as of 6.0a0 this is causing an ImportError when running initial migrations on a newly-created project.
Since the wagtail.contrib.search_promotions module is optional (and off by default on new projects), I've opted to comment out the query logging code with instructions for developers who wish to re-enable it.
# Conflicts:
# CHANGELOG.txt
# docs/releases/6.0.md
2023-11-07 08:24:36 +10:00
Matt Westcott
35d5172df3
Linting fix to adhere to curlylint 0.13
2023-11-06 16:34:16 +00:00
Matt Westcott
8230ac5924
Fix code example for {% picture ... as ... %} tag - fixes #11186
2023-11-06 16:31:38 +00:00
Matt Westcott
f76c1d86e5
Add 5.2.1 release notes
2023-11-06 16:28:30 +00:00
Ian Price
b3b43bf04b
Add a background on the preview iframe #11188
...
Ensures that when the iframe content is loaded there is a background on the iframe. So that transparent websites show correctly in the preview panel.
Fixes #11174
# Conflicts:
# CHANGELOG.txt
# CONTRIBUTORS.md
# docs/releases/6.0.md
2023-11-06 21:06:00 +10:00
Thibaud Colas
14b9b12ee4
Update image documentation to have more details for picture and srcset_image tags ( #11167 )
2023-11-01 12:12:08 +00:00
Matt Westcott
659b3e2b37
Version bump to 5.2 final
2023-11-01 11:01:34 +00:00
Matt Westcott
7afcb7addc
Fill in release date for 5.2
2023-11-01 11:00:38 +00:00
Matt Westcott
eff41ab4c1
Fetch new translations from Transifex
2023-11-01 10:58:42 +00:00
Thibaud Colas
61d263fb1b
Update tutorial screenshots for v5.2
2023-11-01 09:28:06 +00:00
Thibaud Colas
487fbf9ac5
Update guide website URLs for v5.2
2023-11-01 09:17:34 +00:00
Cynthia Kiser
20fde5ac66
Sort groups by name in group index view
2023-10-31 19:06:47 +00:00
Jake Howard
3732bc6eb4
Note that the admin should be limited to "trusted" users
2023-10-31 18:39:31 +00:00
Matt Westcott
3a24268c6e
Release note for #11163
2023-10-31 17:31:52 +00:00
Sage Abdullah
2824c89039
Link to generic views docs in 5.2 release notes for ModelViewSet
2023-10-31 17:30:01 +00:00
Sage Abdullah
b14d6b9ab2
Update modeladmin deprecation and migration notes to also mention ModelViewSet
2023-10-31 17:29:45 +00:00
Sage Abdullah
cb05df3435
Refer to ModelViewSet docs for similar SnippetViewSet customisations
2023-10-31 17:29:43 +00:00
Sage Abdullah
6b130dd871
Shorten links in snippet views customisation docs by setting currentmodule
2023-10-31 17:28:23 +00:00
Sage Abdullah
38a5a582e9
Improve linking in existing viewsets docs
2023-10-31 17:27:11 +00:00
Sage Abdullah
f8fa8e99d8
Add docs for ModelViewSet customisation in generic views extending guide
2023-10-31 17:26:46 +00:00
Sage Abdullah
b4db6e65d5
Move SnippetViewSet.ordering doc to ModelViewSet
2023-10-31 17:26:46 +00:00
Sage Abdullah
5bf3f7e30d
Move viewset intro in generic views docs to the base `ViewSet` usage docs
2023-10-31 17:26:46 +00:00
Sage Abdullah
43e306a49b
Improve linking between viewset reference and extending docs
2023-10-31 17:26:46 +00:00
Sage Abdullah
3032ea2e3b
Document how to use the base `ViewSet` and `ViewSetGroup` classes
2023-10-31 17:26:20 +00:00
Sage Abdullah
1d295276de
Document `register_admin_viewset` hook
2023-10-31 17:26:20 +00:00
Sage Abdullah
20009c6d5d
Move chooser-related headings to under ChooserViewSet
2023-10-31 17:26:20 +00:00
Temidayo
bdc454d3cb
Reinstate support for using list/tuple of `ViewSet`/`ViewSetGroup`s in `register_admin_viewset` ( #11131 )
2023-10-27 14:17:25 +01:00
LB Johnston
532cad027d
Update documentation for InlinePanel DOM events #11090
...
- See #10590 & #10948
- Add cross ref to `InlinePanel` DOM events in client-side docs
- InlinePanel DOM events - add versionadded admonition
2023-10-24 17:44:34 +10:00
Matt Westcott
5cbca2d676
Move breadcrumb class name, snippets template refactor and SidePanels notes into undocumented internals
2023-10-23 10:17:40 +01:00
Matt Westcott
3002ac070d
Reshuffle 5.2 upgrade consideration notes
...
* It's unclear why the imghdr change affects developers, or what action if any they should take - I don't think this needs a note at all
* Changes to menu hooks really come under the category of "Wagtail customisations", not "Changes affecting all projects"
2023-10-23 10:17:40 +01:00
Temidayo
f0180f95e3
Documenting 5.2 as LTS release ( #11111 )
...
* Documenting 5.2 as LTS release
2023-10-23 09:27:40 +01:00