add schedule to search results
This commit is contained in:
parent
79b4b59478
commit
c8c66e7d1b
|
|
@ -94,6 +94,7 @@ class EstablishmentDocument(Document):
|
||||||
'toque_number',
|
'toque_number',
|
||||||
'public_mark',
|
'public_mark',
|
||||||
'slug',
|
'slug',
|
||||||
|
'schedule',
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ from django_elasticsearch_dsl_drf.serializers import DocumentSerializer
|
||||||
from news.serializers import NewsTypeSerializer
|
from news.serializers import NewsTypeSerializer
|
||||||
from search_indexes.documents import EstablishmentDocument, NewsDocument
|
from search_indexes.documents import EstablishmentDocument, NewsDocument
|
||||||
from search_indexes.utils import get_translated_value
|
from search_indexes.utils import get_translated_value
|
||||||
|
from timetable.serialziers import ScheduleRUDSerializer
|
||||||
|
|
||||||
|
|
||||||
class TagsDocumentSerializer(serializers.Serializer):
|
class TagsDocumentSerializer(serializers.Serializer):
|
||||||
|
|
@ -68,6 +69,7 @@ class EstablishmentDocumentSerializer(DocumentSerializer):
|
||||||
|
|
||||||
address = AddressDocumentSerializer()
|
address = AddressDocumentSerializer()
|
||||||
tags = TagsDocumentSerializer(many=True)
|
tags = TagsDocumentSerializer(many=True)
|
||||||
|
schedule = ScheduleRUDSerializer(many=True, allow_null=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
"""Meta class."""
|
"""Meta class."""
|
||||||
|
|
@ -84,6 +86,7 @@ class EstablishmentDocumentSerializer(DocumentSerializer):
|
||||||
'preview_image',
|
'preview_image',
|
||||||
'address',
|
'address',
|
||||||
'tags',
|
'tags',
|
||||||
|
'schedule',
|
||||||
'works_noon',
|
'works_noon',
|
||||||
'works_evening',
|
'works_evening',
|
||||||
# 'collections',
|
# 'collections',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user