models.py 370 Bytes
Newer Older
Ben Waters's avatar
Ben Waters committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from django.contrib.gis.db import models

# Create your models here.
class Location(models.Model):
    name = models.CharField(max_length=50)
    area = models.IntegerField()
    lon = models.FloatField()
    lat = models.FloatField()

    objects = models.GeoManager()

    def __unicode__(self):              # __unicode__ on Python 2
        return self.name

class