Commit 910e15b7 authored by Rafal's avatar Rafal

fill localization model

parent 14414bd3
......@@ -4,4 +4,9 @@ from django.db import models
# Create your models here.
class Localization(models.Model):
pass
name = models.CharField(max_length=300)
longitude = models.DecimalField(max_digits=9, decimal_places=6, default=None)
latitude = models.DecimalField(max_digits=9, decimal_places=6, default=None)
def __str__(self):
return self.name
\ No newline at end of file
......@@ -5,5 +5,5 @@ from app.Localization.models import Localization
class LocalizationSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Localization
fields = ()
fields = ('url', 'name', 'longitude', 'latitude')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment