summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-08-26 18:22:14 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-08-26 18:22:14 +0200
commit533d8c6a23250960a804caf652cedd3b1ff7db63 (patch)
tree392a203387313c78421474c00a26b0bad20459d1
parentbe8a87d53f6fe8102f50364b896c2ebfb0159bb4 (diff)
downloadChimère-533d8c6a23250960a804caf652cedd3b1ff7db63.tar.bz2
Chimère-533d8c6a23250960a804caf652cedd3b1ff7db63.zip
Haystack parameters
-rw-r--r--chimere/settings.sample.py9
-rw-r--r--chimere/urls.py4
2 files changed, 13 insertions, 0 deletions
diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py
index d0ffc42..1ddef5f 100644
--- a/chimere/settings.sample.py
+++ b/chimere/settings.sample.py
@@ -118,6 +118,15 @@ 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'
+ },
+}
+
CHIMERE_CSV_ENCODING = 'ISO-8859-1'
# generic contact email
diff --git a/chimere/urls.py b/chimere/urls.py
index 164ef68..459ed28 100644
--- a/chimere/urls.py
+++ b/chimere/urls.py
@@ -68,6 +68,10 @@ if hasattr(settings, 'CHIMERE_ENABLE_ROUTING') \
'route', name="route"),
)
+if hasattr(settings, 'CHIMERE_SEARCH_ENGINE') \
+ and settings.CHIMERE_SEARCH_ENGINE:
+ urlpatterns += [url(r'^search/', include('haystack.urls')),]
+
urlpatterns += patterns('chimere.views',
url(r'^charte/?$', 'charte', name="charte"),
url(r'^(?P<area_name>[a-zA-Z0-9_-]+/)?contact/?$', 'contactus',