more detailed address information

This commit is contained in:
Kuroshini 2020-02-05 18:45:23 +03:00
parent 8aa7f89fe2
commit d234214467
2 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class EstablishmentListCreateSerializer(model_serializers.EstablishmentBaseSeria
queryset=models.Address.objects.all(),
write_only=True
)
address = AddressBaseSerializer(read_only=True, allow_null=True)
address = AddressDetailSerializer(read_only=True, allow_null=True)
transliterated_name = serializers.CharField(
required=False, allow_null=True, allow_blank=True
)

View File

@ -60,6 +60,7 @@ class EstablishmentListCreateView(EstablishmentMixinViews, generics.ListCreateAP
def get_queryset(self):
return super().get_queryset() \
.with_extended_address_related() \
.with_certain_tag_category_related('category', 'restaurant_category') \
.with_certain_tag_category_related('cuisine', 'restaurant_cuisine') \
.with_certain_tag_category_related('shop_category', 'artisan_category') \