Skip to content

Commit 159ca70

Browse files
author
ogiogi93
committed
Import Document
1 parent 93a1662 commit 159ca70

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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

django_elasticsearch_dsl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.utils.module_loading import autodiscover_modules
22

3-
from .documents import DocType # noqa
3+
from .documents import Document # noqa
44
from .indices import Index # noqa
55
from .fields import * # noqa
66

0 commit comments

Comments
 (0)