summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py39
1 files changed, 34 insertions, 5 deletions
diff --git a/settings.py b/settings.py
index ca2b460..0918e93 100644
--- a/settings.py
+++ b/settings.py
@@ -5,6 +5,7 @@
# overload all theses settings in your local_settings.py file
import os
+_ = lambda s: s
DEBUG = False
TEMPLATE_DEBUG = DEBUG
@@ -14,6 +15,7 @@ PROJECT_NAME = 'Chimere'
ROOT_PATH = os.path.realpath(os.path.dirname(__file__)) + "/"
EMAIL_HOST = 'localhost'
+CONTACT_EMAIL = ''
STATIC_URL = '/static/'
STATIC_ROOT = ROOT_PATH + 'static/'
@@ -26,7 +28,8 @@ JQUERY_CSS_URLS = ('/javascript/jquery-ui/css/smoothness/jquery-ui.css',
OSM_CSS_URLS = ["http://www.openlayers.org/api/theme/default/style.css"]
GPSBABEL = '/usr/bin/gpsbabel'
-GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k' # simplify with an error of 5 meters
+GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k' # simplify with an
+ # error of 5 meters
#GPSBABEL_OPTIONS = 'simplify,count=100'
## chimere specific ##
@@ -68,12 +71,40 @@ CHIMERE_OSM_API_URL = 'api06.dev.openstreetmap.org' # test URL
CHIMERE_OSM_USER = 'test'
CHIMERE_OSM_PASSWORD = 'test'
+# encoding for shapefile import
+CHIMERE_SHAPEFILE_ENCODING = 'ISO-8859-1'
+
# as the web server need to be reloaded when property models are changed
# it could be a good idea to hide it to an admin who could'nt do that
CHIMERE_HIDE_PROPERTYMODEL = False
-# encoding for shapefile import
-CHIMERE_SHAPEFILE_ENCODING = 'ISO-8859-1'
+# enable routing in Chimère
+CHIMERE_ENABLE_ROUTING = False
+
+CHIMERE_ROUTING_TRANSPORT = (('foot', _(u"Foot")),
+ ('bicycle', _(u"Bicycle")),
+ ('motorcar', _(u"Motorcar")),
+ )
+
+CHIMERE_ROUTING_SPEEDS = {'foot':((3, _(u"You are walking slowly")),
+ (6, _(u"You are walking pretty quickly")),),
+ 'bicycle':((16, _(u"You are riding pretty slowly")),
+ (22, _(u"You are riding pretty quickly")),)
+ }
+
+# available routing engine: 'routino'
+CHIMERE_ROUTING_ENGINE = {
+ 'ENGINE': 'routino',
+ 'PATH': '/usr/local/src/web/bin/router',
+ 'DB_PATH': '/var/local/routino/',
+}
+
+CHIMERE_ROUTING_FAIL_MESSAGE = u"""<h3 class='warn'>Attention</h3>
+<p>Le moteur de routage a échoué dans sa recherche de trajet. Les points de
+départ ou d'arrivée sont peut-être trop loin d'une voie existante ou le trajet
+est trop dangereux.</p>"""
+
+NOMINATIM_URL = 'http://nominatim.openstreetmap.org/search'
# thumbnail
CHIMERE_THUMBS_SCALE_HEIGHT=250
@@ -147,7 +178,6 @@ TEMPLATE_DIRS = [
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
ROOT_PATH + 'templates',
- ROOT_PATH + '../chimere/templates',
]
TEMPLATE_CONTEXT_PROCESSORS = (
@@ -185,7 +215,6 @@ except ImportError:
INSTALLED_APPS += [
'south',
'chimere',
-# 'chimere.scripts', # activate it if you want to use old migration scripts
]
LOG_PATH = '/var/log/django/'