summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-06-16 18:48:24 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2015-06-16 18:48:24 +0200
commit3386edf21c1d49459e5373bdcde6a50686ae8d64 (patch)
treeb3463862e0fc1439ca16bb03ed6c3578ba7a55a5
parentdd3bb6e2b29075259e8d900a5020765c99d76347 (diff)
downloadChimère - projet Saclay-3386edf21c1d49459e5373bdcde6a50686ae8d64.tar.bz2
Chimère - projet Saclay-3386edf21c1d49459e5373bdcde6a50686ae8d64.zip
Search: new settings for search
-rw-r--r--settings.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/settings.py b/settings.py
index 371edc1..9c88545 100644
--- a/settings.py
+++ b/settings.py
@@ -57,6 +57,8 @@ CHIMERE_DAYS_BEFORE_EVENT = 30
CHIMERE_ALL_DATED_ARE_FRONT = True
# allow feeds
CHIMERE_FEEDS = True
+# display a directory of items
+CHIMERE_DIRECTORY = False
CHIMERE_ICON_WIDTH = 21
CHIMERE_ICON_HEIGHT = 25
@@ -108,7 +110,7 @@ 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>"""
@@ -118,13 +120,25 @@ NOMINATIM_URL = 'http://nominatim.openstreetmap.org/search'
CHIMERE_THUMBS_SCALE_HEIGHT=250
CHIMERE_THUMBS_SCALE_WIDTH=None
+# search engine
+CHIMERE_SEARCH_ENGINE = False
+HAYSTACK_CONNECTIONS = {
+ 'default': {
+ 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
+ 'URL': 'http://127.0.0.1:8080/solr',
+ 'INCLUDE_SPELLING': True,
+ },
+}
+HAYSTACK_SEARCH_RESULTS_PER_PAGE = 12
+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_ROUTING_WARN_MESSAGE = u"""<h3 class='warn'>Attention</h3>
-<p>Cet itinéraire comporte des passages dangereux, nous vous conseillons de
+<p>Cet itinéraire comporte des passages dangereux, nous vous conseillons de
modifier votre recherche.</p>
"""
@@ -289,6 +303,9 @@ try:
except ImportError, e:
print 'Unable to load local_settings.py:', e
+if CHIMERE_SEARCH_ENGINE:
+ INSTALLED_APPS.insert(INSTALLED_APPS.index('south'), 'haystack')
+
if DJANGO_EXTENSIONS:
INSTALLED_APPS.append('django_extensions')