diff options
-rw-r--r-- | chimere/main/models.py | 10 | ||||
-rw-r--r-- | docs/en/INSTALL.t2t | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chimere/main/models.py b/chimere/main/models.py index 6afb873..144b49d 100644 --- a/chimere/main/models.py +++ b/chimere/main/models.py @@ -20,7 +20,7 @@ """ Models description """ -import os, string +import os, string, json import lxml.etree as ElementTree from datetime import datetime, timedelta from subprocess import Popen, PIPE @@ -295,13 +295,13 @@ class Marker(models.Model): for cat in self.categories.all(): if categories_id and cat.id not in categories_id: continue - items = {'id':self.id, 'name':self.name, + items = {'id':self.id, 'name':json.dumps(self.name), 'geometry':self.point.geojson, 'icon_path':cat.icon.image, 'icon_width':cat.icon.image.width, 'icon_height':cat.icon.image.height,} jsons.append(u'{"type":"Feature", "geometry":%(geometry)s, '\ - u'"properties":{"pk": %(id)d, "name": "%(name)s", '\ + u'"properties":{"pk": %(id)d, "name": %(name)s, '\ u'"icon_path":"%(icon_path)s", "icon_width":%(icon_width)d, '\ u'"icon_height":%(icon_height)d}}' % items) return ",".join(jsons) @@ -425,10 +425,10 @@ class Route(models.Model): ''' if '#' not in color: color = '#' + color - attributes = {'id':self.id, 'name':self.name, + attributes = {'id':self.id, 'name':json.dumps(self.name), 'color':color, 'geometry':self.route.geojson,} return u'{"type":"Feature", "geometry":%(geometry)s, '\ - u'"properties":{"pk": %(id)d, "name": "%(name)s", '\ + u'"properties":{"pk": %(id)d, "name": %(name)s, '\ u'"color":"%(color)s"}}' % attributes def getTinyUrl(self): diff --git a/docs/en/INSTALL.t2t b/docs/en/INSTALL.t2t index 70b0ac9..2279e37 100644 --- a/docs/en/INSTALL.t2t +++ b/docs/en/INSTALL.t2t @@ -9,7 +9,7 @@ Last update: %%date(%m-%d-%Y) +++ Prerequisites +++ - [apache http://www.apache.org/] version 2.x with [mod_python http://www.modpython.org/] 3.x -- [python http://www.python.org/] versions 2.4 or superior +- [python http://www.python.org/] versions 2.6 or 2.7 - [geodjango http://www.djangoproject.com/] version 1.0 - [postgres http://www.postgresql.org/] version 8.x - [gettext http://www.gnu.org/software/gettext/] |