File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ It required to defined ``Document`` class in ``documents.py`` in your app direc
8484
8585 # documents.py
8686
87- from django_elasticsearch_dsl.documents import Document
87+ from django_elasticsearch_dsl import Document
8888 from django_elasticsearch_dsl.registries import registry
8989 from .models import Car
9090
@@ -208,8 +208,7 @@ like this:
208208
209209 # documents.py
210210
211- from django_elasticsearch_dsl import fields
212- from django_elasticsearch_dsl.documents import Document
211+ from django_elasticsearch_dsl import Document, fields
213212
214213 # ... #
215214
@@ -288,8 +287,7 @@ You can use an ObjectField or a NestedField.
288287
289288 # documents.py
290289
291- from django_elasticsearch_dsl import fields
292- from django_elasticsearch_dsl.documents import Document
290+ from django_elasticsearch_dsl import Document, fields
293291 from .models import Car, Manufacturer, Ad
294292
295293 @registry.register_document
@@ -422,7 +420,7 @@ want to put in this Elasticsearch index and also add the `registry.register_docu
422420
423421 # documents.py
424422 from elasticsearch_dsl import Index
425- from django_elasticsearch_dsl.documents import Document
423+ from django_elasticsearch_dsl import Document
426424 from .models import Car, Manufacturer
427425
428426 # The name of your index
Original file line number Diff line number Diff line change 11from django .utils .module_loading import autodiscover_modules
22
3- from .documents import DocType # noqa
3+ from .documents import Document # noqa
44from .indices import Index # noqa
55from .fields import * # noqa
66
You can’t perform that action at this time.
0 commit comments