We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c62ac66 commit dc3d89fCopy full SHA for dc3d89f
django_elasticsearch_dsl/documents.py
@@ -22,7 +22,7 @@
22
LongField,
23
ShortField,
24
TextField,
25
-)
+ ObjectField)
26
from .search import Search
27
28
model_field_class_to_field_class = {
@@ -49,8 +49,16 @@
49
models.URLField: TextField,
50
}
51
52
+try:
53
+ from django.contrib.postgres.fields import JSONField
54
+ model_field_class_to_field_class[JSONField] = ObjectField
55
+except ImportError:
56
+ pass
57
+
58
59
class DocType(DSLDocument):
60
_prepared_fields = []
61
62
def __init__(self, related_instance_to_ignore=None, **kwargs):
63
super(DocType, self).__init__(**kwargs)
64
self._related_instance_to_ignore = related_instance_to_ignore
requirements.txt
@@ -1,3 +1,2 @@
1
django>=1.9.6
2
elasticsearch-dsl>=7.0.0,<8.0.0
3
-
0 commit comments