summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-02-22 13:25:36 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-02-22 13:25:36 +0100
commit9e931a4c55ac6046dcc92079f6bb9380725e975c (patch)
tree00747dab5cd5117cbca7d86d2778f4d51715f9d0
parent0c69b1311c824b21b1fd5291e1748cb33f347f38 (diff)
downloadChimère - projet de référence-9e931a4c55ac6046dcc92079f6bb9380725e975c.tar.bz2
Chimère - projet de référence-9e931a4c55ac6046dcc92079f6bb9380725e975c.zip
Add default settings to be compatible with new version of chimere
-rw-r--r--settings.py46
1 files changed, 38 insertions, 8 deletions
diff --git a/settings.py b/settings.py
index c7147ab..dddae59 100644
--- a/settings.py
+++ b/settings.py
@@ -4,7 +4,7 @@
# Don't edit this file:
# overload all theses settings in your local_settings.py file
-import os
+import os, sys
_ = lambda s: s
DEBUG = False
@@ -112,6 +112,13 @@ est trop dangereux.</p>"""
NOMINATIM_URL = 'http://nominatim.openstreetmap.org/search'
+# Fields used to geolocate with nominatim (http://wiki.openstreetmap.org/wiki/Nominatim#Search)
+# from external sources. Key must be a valid parameters for Nominatim. If given
+# value are property slugs use the corresponding value otherwise use it as a
+# fixed value
+# e.g : {'street':'address', 'city':'city', 'country':u'France'}
+CHIMERE_NOMINATIM_FIELDS = {'street':'address', 'city':'city',
+ 'country':u'France'}
MOBILE_TEST = False
MOBILE_DOMAINS = []
@@ -124,12 +131,19 @@ CHIMERE_SEARCH_ENGINE = False
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
- 'URL': 'http://127.0.0.1:8080/solr'
+ 'URL': 'http://127.0.0.1:8080/solr',
+ 'INCLUDE_SPELLING': True,
},
}
CHIMERE_CSV_ENCODING = 'ISO-8859-1'
+CHIMERE_DEFAULT_ACTIONS = ['view', 'contribute']
+CHIMERE_DEFAULT_ACTION_LABEL = [u"Cartes", u"Ajouter un élément"]
+
+# generic contact email
+CONTACT_EMAIL = ''
+
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
@@ -147,6 +161,9 @@ DATABASES = {
},
}
+if 'test' in sys.argv:
+ SOUTH_TESTS_MIGRATE = False
+
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
@@ -317,24 +334,37 @@ if 'MAP_JS_URLS' not in globals():
],
'leaflet':[
STATIC_URL + "leaflet/leaflet.js",
- STATIC_URL + "chimere/js/jquery.chimere-leaflet.js"
+ STATIC_URL + "chimere/js/jquery.chimere-leaflet.js",
+ "http://maps.stamen.com/js/tile.stamen.js?v1.2.1"
]
}
-
+ if DEBUG:
+ MAP_JS_URLS['leaflet'][0] = STATIC_URL + "leaflet/leaflet-src.js"
+ if CHIMERE_ENABLE_CLUSTERING:
+ MAP_JS_URLS['leaflet'] += [
+ STATIC_URL + "leaflet-markercluster/leaflet.markercluster.js"
+ ]
if 'MAP_CSS_URLS' not in globals():
global MAP_CSS_URLS
MAP_CSS_URLS = {
'openlayers':["http://www.openlayers.org/api/theme/default/style.css"],
- 'leaflet':[STATIC_URL + "leaflet/leaflet.css"],
+ 'leaflet':[STATIC_URL + "leaflet/leaflet.css",
+ STATIC_URL + "leaflet-markercluster/MarkerCluster.css",
+ STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css",
+ ]
}
# key: [(url, condition)]
MAP_CONDITIONNAL_CSS_URLS = {
'openlayers':[("http://www.openlayers.org/api/theme/default/style.css",
None)],
'leaflet':[
- (STATIC_URL + "leaflet/leaflet.css", None),
- (STATIC_URL + "leaflet/leaflet.ie.css", 'lte IE 8')
- ]
+ (STATIC_URL + "leaflet/leaflet.css", None),
+ (STATIC_URL + "leaflet/leaflet.ie.css", 'lte IE 8'),
+ (STATIC_URL + "leaflet-markercluster/MarkerCluster.css", None),
+ (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css", None),
+ (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.ie.css",
+ 'lte IE 8'),
+ ]
}
if 'OSM_JS_URLS' not in globals():