Fix a couple of search indexing examples

This commit is contained in:
Karl Hobley 2018-05-03 12:29:35 +01:00 committed by GitHub
parent d0670da61b
commit df4f1204e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,7 +115,9 @@ For example, if we have a book that has a ``ForeignKey`` to its author, we can n
.. code-block:: python
class Book(models.Model, indexed.Indexed):
from wagtail.search import index
class Book(models.Model, index.Indexed):
...
search_fields = [
@ -134,7 +136,9 @@ It works the other way around as well. You can index an author's books, allowing
.. code-block:: python
class Author(models.Model, indexed.Indexed):
from wagtail.search import index
class Author(models.Model, index.Indexed):
...
search_fields = [