diff options
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 102 |
1 files changed, 59 insertions, 43 deletions
diff --git a/settings.py b/settings.py index ef31399..190a0b4 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 @@ -23,19 +24,17 @@ STATIC_ROOT = ROOT_PATH + 'static/' TINYMCE_URL = '/tinymce/' EXTRA_CSS = [] -JQUERY_JS_URLS = ('/javascript/jquery/jquery.js', - '/javascript/jquery-ui/jquery-ui.js',) -JQUERY_CSS_URLS = ('/javascript/jquery-ui/css/smoothness/jquery-ui.css', - '/javascript/jquery-ui-themes/base/jquery.ui.all.css') +JQUERY_JS_URLS = [] +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) @@ -53,6 +52,10 @@ CHIMERE_DISPLAY_AREAS = True # don't forget to run the upgrade.py script to create appropriate fields in # the database CHIMERE_DAYS_BEFORE_EVENT = 30 +# Dated events must usualy be checked as 'front page' to be displayed +# on front page - set CHIMERE_ALL_DATED_ARE_FRONT to True if you want to +# display all events on front page +CHIMERE_ALL_DATED_ARE_FRONT = True # allow feeds CHIMERE_FEEDS = True @@ -67,10 +70,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' @@ -89,13 +94,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 = { @@ -105,25 +111,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' @@ -181,7 +188,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 = ( @@ -195,9 +202,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', ] @@ -225,6 +229,7 @@ INSTALLED_APPS = [ try: import djcelery import kombu + kombu djcelery.setup_loader() BROKER_URL = 'django://' INSTALLED_APPS += ['kombu.transport.django', @@ -238,12 +243,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. @@ -275,8 +281,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 }, }, } @@ -289,6 +295,15 @@ except ImportError, e: if DJANGO_EXTENSIONS: INSTALLED_APPS.append('django_extensions') +if not JQUERY_JS_URLS: + JQUERY_JS_URLS = (STATIC_URL + 'jquery/jquery.min.js', + STATIC_URL + 'jquery-ui/jquery-ui.min.js') + +if not JQUERY_CSS_URLS: + JQUERY_CSS_URLS = (STATIC_URL + 'jquery-ui/smoothness/jquery-ui.css', + STATIC_URL + 'jquery-ui/base/jquery.ui.all.css') + + LOGGING['handlers']['logfile']['filename'] = LOGFILENAME if 'CHIMERE_SHARE_NETWORKS' not in globals(): @@ -297,12 +312,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(): @@ -312,6 +327,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" + ] |