from django.contrib.gis.db import models
from django.contrib.gis.geos import WKTWriter

class Routes(models.Model):
    # each route needs to have a unique id
    routeid = models.PositiveIntegerField(primary_key=True)
    # geometry field for the route
    routegeom = models.MultiLineStringField()

    class Meta:
        # human readable names for route objects
        # singular name
        verbose_name = 'route'
        # plural name
        verbose_name_plural = 'routes'

    def __str__(self):
        return str(self.routeid)
from django.contrib.gis.db import models
from django.contrib.gis.geos import WKTWriter

class Routes(models.Model):
    # each route needs to have a unique id
    routeid = models.PositiveIntegerField(primary_key=True)
    # geometry field for the route
    routegeom = models.MultiLineStringField()

    class Meta:
        # human readable names for route objects
        # singular name
        verbose_name = 'route'
        # plural name
        verbose_name_plural = 'routes'

    def __str__(self):
        return str(self.routeid)
# each route needs to have a unique id # geometry field for the route # human readable names for route objects # singular name # plural name