diff options
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 91 |
1 files changed, 53 insertions, 38 deletions
diff --git a/settings.py b/settings.py index 9c88545..843f09e 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) @@ -72,10 +73,11 @@ 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' @@ -91,16 +93,18 @@ CHIMERE_ENABLE_CLUSTERING = False # enable routing in Chimère CHIMERE_ENABLE_ROUTING = False -CHIMERE_ROUTING_TRANSPORT = (('foot', _(u"Foot")), - ('bicycle', _(u"Bicycle")), - ('motorcar', _(u"Motorcar")), - ) +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 = { @@ -117,8 +121,8 @@ 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 # search engine CHIMERE_SEARCH_ENGINE = False @@ -135,7 +139,8 @@ HAYSTACK_AUTOCOMPLETE = False # 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 @@ -198,7 +203,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 = ( @@ -212,9 +217,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', ] @@ -242,6 +244,7 @@ INSTALLED_APPS = [ try: import djcelery import kombu + kombu djcelery.setup_loader() BROKER_URL = 'django://' INSTALLED_APPS += ['kombu.transport.django', @@ -255,12 +258,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. @@ -292,12 +296,23 @@ 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 }, }, } +CHIMERE_SEARCH_ENGINE = False +# default haystack parameters when search engine is activated +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.solr_backend.SolrEngine', + 'URL': 'http://127.0.0.1:8080/solr' + }, +} +HAYSTACK_SEARCH_RESULTS_PER_PAGE = 12 +HAYSTACK_AUTOCOMPLETE = False + try: from local_settings import * except ImportError, e: @@ -317,7 +332,6 @@ 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(): @@ -326,12 +340,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(): @@ -341,6 +355,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" + ] |