summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index d4ba9be..61ae576 100644
--- a/main/models.py
+++ b/main/models.py
@@ -11,6 +11,20 @@ from django.contrib import admin
from chimere import settings
from chimere.main.widgets import PointField
+
+class News(models.Model):
+ """News of the site
+ """
+ title = models.CharField(_("Name"), max_length=150)
+ available = models.BooleanField(_("Available"))
+ date = models.DateField(_("Date"), auto_now_add=True)
+ content = models.TextField()
+ def __unicode__(self):
+ ordering = ["-date"]
+ return self.title
+ class Meta:
+ verbose_name = _("News")
+
class Category(models.Model):
"""Category of Point Of Interest (POI)
"""
@@ -122,7 +136,6 @@ class Marker(models.Model):
def getGeoJSON(self):
'''Return a GeoJSON string
'''
- print self.subcategory.icon.image
return """{"type":"Feature", "geometry":{"type":"Point", \
"crs": "EPSG:%(epsg)d", "coordinates":[%(longitude)s, %(latitude)s]}, \
"properties":{"pk": %(id)d, "name": "%(name)s", \