mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-19 14:31:00 +00:00
add note about Wagtail <=1.4 syntax for search_fields
This commit is contained in:
parent
020279a8a6
commit
b39ff4a134
1 changed files with 12 additions and 0 deletions
|
|
@ -173,6 +173,18 @@ The following example defines a basic blog post model in ``blog/models.py``:
|
|||
FieldPanel('body', classname="full")
|
||||
]
|
||||
|
||||
|
||||
.. note::
|
||||
On Wagtail versions before 1.5, ``search_fields`` needs to be defined as a tuple:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
search_fields = Page.search_fields + (
|
||||
index.SearchField('intro'),
|
||||
index.SearchField('body'),
|
||||
)
|
||||
|
||||
|
||||
Create a template at ``blog/templates/blog/blog_page.html``:
|
||||
|
||||
.. code-block:: html+django
|
||||
|
|
|
|||
Loading…
Reference in a new issue