summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py99
1 files changed, 57 insertions, 42 deletions
diff --git a/settings.py b/settings.py
index 99117a6..0a9ba06 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)
@@ -71,10 +72,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'
@@ -90,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 = {
@@ -116,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
@@ -134,12 +139,13 @@ 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
-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'
@@ -197,7 +203,6 @@ MEDIA_URL = '/media/'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
-# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
@@ -211,9 +216,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',
]
@@ -241,6 +243,7 @@ INSTALLED_APPS = [
try:
import djcelery
import kombu
+ kombu
djcelery.setup_loader()
BROKER_URL = 'django://'
INSTALLED_APPS += ['kombu.transport.django',
@@ -254,12 +257,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.
@@ -291,12 +295,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:
@@ -316,7 +331,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():
@@ -325,12 +339,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():
@@ -340,6 +354,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"
+ ]