From 56b5af12915639ed54164a00d8837e96a143c090 Mon Sep 17 00:00:00 2001 From: dormantman Date: Tue, 28 Jan 2020 15:49:00 +0300 Subject: [PATCH] Added district_name field --- apps/location/models.py | 2 ++ apps/location/serializers/common.py | 1 + 2 files changed, 3 insertions(+) diff --git a/apps/location/models.py b/apps/location/models.py index 5b2fa721..a50b1f41 100644 --- a/apps/location/models.py +++ b/apps/location/models.py @@ -223,6 +223,8 @@ class Address(models.Model): default='', help_text=_('Ex.: 350018')) coordinates = models.PointField( _('Coordinates'), blank=True, null=True, default=None) + district_name = models.CharField( + _('District name'), max_length=500, blank=True, default='') old_id = models.IntegerField(null=True, blank=True, default=None) class Meta: diff --git a/apps/location/serializers/common.py b/apps/location/serializers/common.py index ff356be4..00fc893a 100644 --- a/apps/location/serializers/common.py +++ b/apps/location/serializers/common.py @@ -171,6 +171,7 @@ class AddressBaseSerializer(serializers.ModelSerializer): 'postal_code', 'latitude', 'longitude', + 'district_name', # todo: remove this fields (backward compatibility) 'geo_lon',