diff options
author | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-06-13 01:18:25 +0000 |
---|---|---|
committer | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-06-13 01:18:25 +0000 |
commit | c5a6d45415c7601f9a515d05a61ee795dc37536b (patch) | |
tree | c120b44a9cc0eea9ec69a1817053f97b22e66856 /apps/locations/models.py | |
parent | 6657ae24658383a9841450329a518327638651c0 (diff) |
updated maps.html to use google maps v3 and created custom route model using gmaps polyline tools to encode points
Diffstat (limited to 'apps/locations/models.py')
-rw-r--r-- | apps/locations/models.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/locations/models.py b/apps/locations/models.py index 47c5d65..e088697 100644 --- a/apps/locations/models.py +++ b/apps/locations/models.py @@ -159,6 +159,25 @@ class Location(models.Model): def __unicode__(self): return self.name +class Route(models.Model): + name = models.CharField(max_length=200) + slug = models.SlugField() + zoom = models.CharField(max_length=2, null=True) + template_var_name = models.CharField(max_length=10, null=True) + pub_date = models.DateTimeField('Date published',null=True) + # GeoDjango specific Polygon Field and GeoManager + geometry = models.MultiPointField(srid=4326) + # GeoManager, a subclass that adds a rich set of geospatial queryset methods + objects = models.GeoManager() + + def get_absolute_url(self): + return "/locations/%s/%s/%s/" % (self.slug) + + + def __unicode__(self): return self.name + + + class WritingbyLocationSitemap(Sitemap): changefreq = "weekly" priority = 0.6 |