diff options
Diffstat (limited to 'chimere/settings.sample.py')
| -rw-r--r-- | chimere/settings.sample.py | 72 | 
1 files changed, 57 insertions, 15 deletions
| diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py index 1ddef5f..1ddeca6 100644 --- a/chimere/settings.sample.py +++ b/chimere/settings.sample.py @@ -1,7 +1,8 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# This file is an example of settings.py for a Chimère project +# Don't edit this file: +# overload all theses settings in your local_settings.py file  import os, sys  _ = lambda s: s @@ -27,8 +28,6 @@ JQUERY_JS_URLS = ('/javascript/jquery/jquery.js',  JQUERY_CSS_URLS = ('/javascript/jquery-ui/css/smoothness/jquery-ui.css',                     '/javascript/jquery-ui-themes/base/jquery.ui.all.css') -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 @@ -44,8 +43,8 @@ CHIMERE_EPSG_PROJECTION = 900913  # projection displayed to the end user by openlayers  # chimere use the same projection to save its data in the database  CHIMERE_EPSG_DISPLAY_PROJECTION = 4326 -# display of shortcuts for areas -CHIMERE_DISPLAY_AREAS = True +# display of shortcuts for maps +CHIMERE_DISPLAY_MAPS = True  # number of day before an event to display  # if equal to 0: disable event management  # if you change this value from 0 to a value in a production environnement @@ -114,6 +113,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 = {} +  # thumbnail  CHIMERE_THUMBS_SCALE_HEIGHT=250  CHIMERE_THUMBS_SCALE_WIDTH=None @@ -129,6 +135,8 @@ HAYSTACK_CONNECTIONS = {  CHIMERE_CSV_ENCODING = 'ISO-8859-1' +CHIMERE_DEFAULT_ACTIONS = ['view', 'contribute', 'rss', 'contact'] +  # generic contact email  CONTACT_EMAIL = '' @@ -283,6 +291,9 @@ LOGGING = {'version': 1,      },  } +CHIMERE_VIEW_RENDERER = 'openlayers' # 'openlayers' or 'leaflet' +CHIMERE_EDIT_RENDERER = 'openlayers' # 'openlayers' +  try:      from local_settings import *  except ImportError, e: @@ -306,13 +317,44 @@ if 'CHIMERE_SHARE_NETWORKS' not in globals():                   STATIC_URL + 'chimere/img/identica.png'),      ) -if 'OSM_JS_URLS' not in globals(): -    global OSM_JS_URLS -    OSM_JS_URLS = [STATIC_URL + "openlayers/OpenLayers.js", -                   STATIC_URL + "openlayers/SimplePanZoom.js", -                   "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", -                   STATIC_URL + "openlayers/SimplePanZoom.js", -                   "http://www.openstreetmap.org/openlayers/OpenStreetMap.js"] +if 'MAP_JS_URLS' not in globals(): +    global MAP_JS_URLS +    MAP_JS_URLS = { +        'openlayers':[ +            STATIC_URL + "openlayers/OpenLayers.js", +            STATIC_URL + "openlayers/SimplePanZoom.js", +            "http://www.openstreetmap.org/openlayers/OpenStreetMap.js", +            STATIC_URL + "chimere/js/jquery.chimere-ol.js" +            ], +        'leaflet':[ +            STATIC_URL + "leaflet/leaflet.js", +            STATIC_URL + "chimere/js/jquery.chimere-leaflet.js", +            "http://maps.stamen.com/js/tile.stamen.js?v1.2.1" +            ] +    } +    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", +                   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-markercluster/MarkerCluster.css", None), +         (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css", None), +         (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.ie.css", +          'lte IE 8'), +         ] +    } | 
