Fix a couple of search indexing examples

pull/4132/merge
Karl Hobley 2018-05-03 12:29:35 +01:00 zatwierdzone przez GitHub
rodzic d0670da61b
commit df4f1204e8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -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 = [