mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-02 20:44:53 +00:00
Indexed.search_fields used to be a tuple. This is incorrect, and it
should have been a list. Changing it to be a list now would be a
backwards incompatible change, as people do
search_fields = Page.search_fields + (
SearchField('body')
)
Adding a tuple to the end of a list causes an error, so this would
cause all old code that used tuples to throw an error. This is not
great.
A new ThisShouldBeAList class, which subclasses list, has been added.
It additionally allows tuples to be added to it, as in the above
behaviour, but will raise a deprecation warning if someone does this.
Old code that uses tuples will continue to work, but raise a deprecation
warning.
See #2310
|
||
|---|---|---|
| .. | ||
| api | ||
| bin | ||
| contrib | ||
| project_template | ||
| tests | ||
| utils | ||
| wagtailadmin | ||
| wagtailcore | ||
| wagtaildocs | ||
| wagtailembeds | ||
| wagtailforms | ||
| wagtailimages | ||
| wagtailredirects | ||
| wagtailsearch | ||
| wagtailsites | ||
| wagtailsnippets | ||
| wagtailusers | ||
| __init__.py | ||