Skip to content

Instantly share code, notes, and snippets.

@mattdennewitz
Created September 5, 2009 19:47
Show Gist options
  • Save mattdennewitz/181499 to your computer and use it in GitHub Desktop.
Save mattdennewitz/181499 to your computer and use it in GitHub Desktop.
from django.contrib.gis.db import models as geomodels
class Place(geomodels.Model):
woe_id = geomodels.IntegerField()
place_id = geomodels.CharField(max_length=255)
place_type = geomodels.CharField(max_length=255)
place_type_id = geomodels.IntegerField()
label = geomodels.CharField(max_length=255)
created = geomodels.DateTimeField()
geometry = geomodels.PolygonField(srid=4326)
objects = geomodels.GeoManager()
class Meta:
verbose_name = u"Flickr Contour Shape"
def __unicode__(self):
return unicode("%s: %s" % (self.woe_id, self.label))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment