summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-08-22 13:28:53 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-08-22 13:28:53 +0200
commitd5feb2550a0d9149958720ce6bb262ebe2d96d96 (patch)
treef5ebc5984ee72f88a399dfafc16121bac966142b
parent433597411084d3c60a9cceeb58798e65a76aab36 (diff)
downloadChimère-2.0-RC4.tar.bz2
Chimère-2.0-RC4.zip
Replace unidecode by the django slugify filterv2.0-RC4
-rw-r--r--chimere/models.py6
-rw-r--r--debian/control3
-rw-r--r--docs/install.rst14
3 files changed, 16 insertions, 7 deletions
diff --git a/chimere/models.py b/chimere/models.py
index ca608e8..103503e 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -25,7 +25,6 @@ import simplejson as json
from lxml import etree
from datetime import datetime, timedelta
from subprocess import Popen, PIPE
-import unidecode
from django.conf import settings
from django.contrib.gis.db import models
@@ -36,6 +35,7 @@ from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.db.models.signals import post_save
from django import forms
+from django.template import defaultfilters
from django.utils.translation import ugettext_lazy as _
from chimere.widgets import PointField, RouteField, SelectMultipleField, \
@@ -308,8 +308,8 @@ class Marker(GeographicItem):
super(Marker, self).__init__(*args, **kwargs)
# add read attributes for properties
for property in self.getProperties():
- attr_name = unidecode.unidecode(property.propertymodel.name).lower()
- attr_name = re.sub(r'\W+','_', attr_name.strip())
+ attr_name = defaultfilters.slugify(property.propertymodel.name)
+ attr_name = re.sub(r'-','_', attr_name)
if not hasattr(self, attr_name):
setattr(self, attr_name, property.value)
diff --git a/debian/control b/debian/control
index 92cfa21..7317430 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,6 @@ Depends: python-django (>=1.3), python-gdal, python-psycopg2,
python-beautifulsoup, python-imaging, libjs-jquery,
libjs-jquery-ui, libjs-jquery-ui-theme-base,
postgresql-9.1, postgresql-9.1-postgis, gettext,
- python-simplejson, gpsbabel, python-django-south,
- python-unidecode
+ python-simplejson, gpsbabel, python-django-south
Recommends: tinymce, python-django-celery, python-kombu
Suggests: libjs-jquery-ui-theme-south-street
diff --git a/docs/install.rst b/docs/install.rst
index d0f918a..8c4a517 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -60,8 +60,18 @@ Linux distribution repositories. For instance on Debian Wheezy::
python-beautifulsoup tinymce apache2 libgeos-3.3.3 proj-bin gdal-bin \
python-gdal python-lxml python-psycopg2 python-imaging gettext \
postgresql-9.1 postgresql-9.1-postgis libjs-jquery libjs-jquery-ui \
- python-django-celery python-simplejson python-gdal python-unidecode \
- gpsbabel
+ python-django-celery python-simplejson python-gdal gpsbabel
+
+On Debian Squeeze (you need to activate backports)::
+
+ apt-get install -t squeeze-backports python-django
+
+ apt-get install python python-django-south python-beautifulsoup tinymce \
+ apache2 libgeos-3.2.0 proj-bin gdal-bin python-gdal python-lxml \
+ python-psycopg2 python-imaging gettext postgresql-8.4 \
+ postgresql-8.4-postgis libjs-jquery libjs-jquery-ui python-simplejson \
+ python-gdal gpsbabel
+
If these packages do not exist in your distribution's repository, please refer
to the applications' websites.