diff options
-rw-r--r-- | settings.py | 83 |
1 files changed, 44 insertions, 39 deletions
diff --git a/settings.py b/settings.py index 371edc1..51752bf 100644 --- a/settings.py +++ b/settings.py @@ -4,7 +4,8 @@ # Don't edit this file: # overload all theses settings in your local_settings.py file -import os, sys +import os +import sys _ = lambda s: s DEBUG = False @@ -29,11 +30,11 @@ JQUERY_CSS_URLS = [] 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,count=100' +# simplify with an error of 5 meters +GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k' +# GPSBABEL_OPTIONS = 'simplify,count=100' -## chimere specific ## +# chimere specific ## CHIMERE_DEFAULT_ZOOM = 10 # center of the map CHIMERE_DEFAULT_CENTER = (-1.679444, 48.114722) @@ -70,10 +71,12 @@ CHIMERE_MINIATURE_BY_DEFAULT = False # JS definition of the default map (for admin and when no map are defined in # the application) # cf. OpenLayers documentation for more details -CHIMERE_DEFAULT_MAP_LAYER = "new OpenLayers.Layer.OSM.Mapnik('Mapnik')" # OSM mapnik map + +# OSM mapnik map +CHIMERE_DEFAULT_MAP_LAYER = "new OpenLayers.Layer.OSM.Mapnik('Mapnik')" CHIMERE_XAPI_URL = 'http://open.mapquestapi.com/xapi/api/0.6/' -CHIMERE_OSM_API_URL = 'api06.dev.openstreetmap.org' # test URL +CHIMERE_OSM_API_URL = 'api06.dev.openstreetmap.org' # test URL CHIMERE_OSM_USER = 'test' CHIMERE_OSM_PASSWORD = 'test' @@ -92,13 +95,14 @@ 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")),) - } +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 = { @@ -108,25 +112,26 @@ CHIMERE_ROUTING_ENGINE = { } 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 +<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 -CHIMERE_THUMBS_SCALE_WIDTH=None +CHIMERE_THUMBS_SCALE_HEIGHT = 250 +CHIMERE_THUMBS_SCALE_WIDTH = None # length of short description CHIMERE_SHORT_DESC_LENGTH = 400 -CHIMERE_MODIF_EMAIL = _(u"""Hello, I would like to propose you a modification about this item: """) +CHIMERE_MODIF_EMAIL = _(u"Hello, I would like to propose you a modification " + u"about this item: ") -CHIMERE_ROUTING_WARN_MESSAGE = u"""<h3 class='warn'>Attention</h3> -<p>Cet itinéraire comporte des passages dangereux, nous vous conseillons de -modifier votre recherche.</p> -""" +CHIMERE_ROUTING_WARN_MESSAGE = u"<h3 class='warn'>Attention</h3>"\ + u"<p>Cet itinéraire comporte des passages dangereux, nous vous conseillons"\ + u" de modifier votre recherche, en ajoutant par exemple un ou des points "\ + u"d'étape à votre parcours pour éviter les zones de danger.</p>" CHIMERE_CSV_ENCODING = 'ISO-8859-1' @@ -184,7 +189,7 @@ MEDIA_URL = '/media/' TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.load_template_source', + # 'django.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( @@ -198,9 +203,6 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'chimere_saclay.urls' TEMPLATE_DIRS = [ - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. ROOT_PATH + 'templates', ] @@ -228,6 +230,7 @@ INSTALLED_APPS = [ try: import djcelery import kombu + kombu djcelery.setup_loader() BROKER_URL = 'django://' INSTALLED_APPS += ['kombu.transport.django', @@ -241,12 +244,13 @@ INSTALLED_APPS += [ 'chimere', ] -MOBILE_DOMAINS = [] # if you have specific domains for mobile access +MOBILE_DOMAINS = [] # if you have specific domains for mobile access LOGFILENAME = '/var/log/django/chimere.log' -LOGGING = {'version': 1, - 'disable_existing_loggers': False, +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, 'handlers': { # Include the default Django email handler for errors # This is what you'd get without configuring logging at all. @@ -278,8 +282,8 @@ LOGGING = {'version': 1, # Your own app - this assumes all your logger names start with "myapp." 'chimere': { 'handlers': ['logfile'], - 'level': 'WARNING', # Or maybe INFO or DEBUG - 'propogate': False + 'level': 'WARNING', # Or maybe INFO or DEBUG + 'propogate': False }, }, } @@ -309,12 +313,12 @@ if 'CHIMERE_SHARE_NETWORKS' not in globals(): # share with global CHIMERE_SHARE_NETWORKS CHIMERE_SHARE_NETWORKS = ( - ("Email", 'mailto:?subject=%(text)s&body=%(url)s', - STATIC_URL + 'chimere/img/email.png'), - ("Facebook", 'http://www.facebook.com/sharer.php?t=%(text)s&u=%(url)s', - STATIC_URL + 'chimere/img/facebook.png'), - ("Twitter", 'http://twitter.com/home?status=%(text)s %(url)s', - STATIC_URL + 'chimere/img/twitter.png'), + ("Email", 'mailto:?subject=%(text)s&body=%(url)s', + STATIC_URL + 'chimere/img/email.png'), + ("Facebook", 'http://www.facebook.com/sharer.php?t=%(text)s&u=%(url)s', + STATIC_URL + 'chimere/img/facebook.png'), + ("Twitter", 'http://twitter.com/home?status=%(text)s %(url)s', + STATIC_URL + 'chimere/img/twitter.png'), ) if 'OSM_JS_URLS' not in globals(): @@ -324,6 +328,7 @@ if 'OSM_JS_URLS' not in globals(): "http://www.openstreetmap.org/openlayers/OpenStreetMap.js"] if 'OSM_MOBILE_JS_URLS' not in globals(): global OSM_MOBILE_JS_URLS - OSM_MOBILE_JS_URLS = [STATIC_URL + "openlayers/OpenLayers.mobile.js", - "http://www.openstreetmap.org/openlayers/OpenStreetMap.js" - ] + OSM_MOBILE_JS_URLS = [ + STATIC_URL + "openlayers/OpenLayers.mobile.js", + "http://www.openstreetmap.org/openlayers/OpenStreetMap.js" + ] |