src/p4l/settings.py
changeset 114 93b45b4f423c
parent 113 c05567404888
child 117 0a4e7d6ebe80
--- a/src/p4l/settings.py	Fri Sep 20 22:21:48 2013 +0200
+++ b/src/p4l/settings.py	Sat Sep 21 23:49:04 2013 +0200
@@ -174,6 +174,8 @@
     }
 }
 
+NB_RECORDS_BY_PAGE = 20
+
 HAYSTACK_CONNECTIONS = {
     'default': {
         'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
@@ -182,9 +184,21 @@
     },
 }
 
+HAYSTACK_SIGNAL_PROCESSOR = 'p4l.search.signals.P4lSignalProcessor'
+HAYSTACK_SEARCH_RESULTS_PER_PAGE = NB_RECORDS_BY_PAGE
+
+CACHES = {
+    'default' : {
+        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
+    },
+    'indexation': {
+        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
+        'LOCATION': 'p4l-indexation',
+        'TIMEOUT': 300,
+    }
+}
 
 
-NB_RECORDS_BY_PAGE = 20
 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
 SPARQL_SUBJECT_QUERIES = {
 "filter" : """
@@ -524,6 +538,17 @@
 "child-count" : ""
 }
 
+RDF_SCHEMES = {
+    'organization': 'http://www.iiep.unesco.org/plan4learning/scheme/Organizations',
+    'audience': '',
+    'language': 'http://www.iiep.unesco.org/plan4learning/scheme/Languages',
+    'type': 'http://www.iiep.unesco.org/plan4learning/scheme/DocumentType',
+    'subject': 'http://skos.um.es/unescothes/CS000',
+    'theme': 'http://www.iiep.unesco.org/plan4learning/scheme/Themes',
+    'country': 'http://skos.um.es/unescothes/CS000/Countries',    
+    'project': 'http://www.iiep.unesco.org/plan4learning/scheme/Projects'
+}
+
 REST_FRAMEWORK = {
     # Use hyperlinked styles by default.
     # Only used if the `serializer_class` attribute is not set on a view.