Browse Source

Add fields to layer model

master
Tom Darboux 2 months ago
parent
commit
70e1c9cc57
  1. 8
      base/models.py

8
base/models.py

@ -1,10 +1,14 @@
#from django.db import models
from django.contrib.gis.db import models
from django.contrib.auth.models import User, Group
import uuid
# Create your models here.
class Layer(models.Model):
token = models.CharField(max_length=50)
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=50)
created = models.DateTimeField(auto_now_add=True)
owner = models.ForeignKey(Layer, on_delete=models.CASCADE, null=True)
class Place(models.Model):
lon = models.FloatField()

Loading…
Cancel
Save