diff --git a/events/models/locale.py b/events/models/locale.py index b873e8b..f6164ad 100644 --- a/events/models/locale.py +++ b/events/models/locale.py @@ -71,6 +71,7 @@ class SPR(models.Model): return 'no_spr' class SPRSerializer(serializers.ModelSerializer): + display = serializers.CharField(source='__str__', read_only=True) class Meta: model = SPR fields = ( @@ -78,7 +79,8 @@ class SPRSerializer(serializers.ModelSerializer): 'name', 'code', 'country', - 'slug' + 'slug', + 'display' ) class City(models.Model): @@ -102,6 +104,7 @@ class City(models.Model): class CitySerializer(serializers.ModelSerializer): + display = serializers.CharField(source='__str__', read_only=True) class Meta: model = City fields = ( @@ -109,6 +112,7 @@ class CitySerializer(serializers.ModelSerializer): 'name', 'spr', 'tz', - 'slug' + 'slug', + 'display' ) diff --git a/get_together/templates/get_together/create_event.html b/get_together/templates/get_together/create_event.html index 184e54e..eaf1d6c 100644 --- a/get_together/templates/get_together/create_event.html +++ b/get_together/templates/get_together/create_event.html @@ -15,18 +15,22 @@ {% block javascript %} +}); {% endblock %} diff --git a/get_together/templates/get_together/edit_event.html b/get_together/templates/get_together/edit_event.html index 534f5a3..6687ed6 100644 --- a/get_together/templates/get_together/edit_event.html +++ b/get_together/templates/get_together/edit_event.html @@ -15,18 +15,21 @@ {% block javascript %}