src/p4l/settings.py
changeset 114 93b45b4f423c
parent 113 c05567404888
child 117 0a4e7d6ebe80
equal deleted inserted replaced
113:c05567404888 114:93b45b4f423c
   172             'propagate': True,
   172             'propagate': True,
   173         },
   173         },
   174     }
   174     }
   175 }
   175 }
   176 
   176 
       
   177 NB_RECORDS_BY_PAGE = 20
       
   178 
   177 HAYSTACK_CONNECTIONS = {
   179 HAYSTACK_CONNECTIONS = {
   178     'default': {
   180     'default': {
   179         'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
   181         'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
   180         'URL': '',
   182         'URL': '',
   181         'INDEX_NAME': 'p4l',
   183         'INDEX_NAME': 'p4l',
   182     },
   184     },
   183 }
   185 }
   184 
   186 
   185 
   187 HAYSTACK_SIGNAL_PROCESSOR = 'p4l.search.signals.P4lSignalProcessor'
   186 
   188 HAYSTACK_SEARCH_RESULTS_PER_PAGE = NB_RECORDS_BY_PAGE
   187 NB_RECORDS_BY_PAGE = 20
   189 
       
   190 CACHES = {
       
   191     'default' : {
       
   192         'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
       
   193     },
       
   194     'indexation': {
       
   195         'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
       
   196         'LOCATION': 'p4l-indexation',
       
   197         'TIMEOUT': 300,
       
   198     }
       
   199 }
       
   200 
       
   201 
   188 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
   202 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
   189 SPARQL_SUBJECT_QUERIES = {
   203 SPARQL_SUBJECT_QUERIES = {
   190 "filter" : """
   204 "filter" : """
   191 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   205 PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
   192 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   206 PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   520 SPARQL_AUDIENCE_QUERIES = {
   534 SPARQL_AUDIENCE_QUERIES = {
   521 "filter" : "",
   535 "filter" : "",
   522 "root" : "",
   536 "root" : "",
   523 "childs" : "",
   537 "childs" : "",
   524 "child-count" : ""
   538 "child-count" : ""
       
   539 }
       
   540 
       
   541 RDF_SCHEMES = {
       
   542     'organization': 'http://www.iiep.unesco.org/plan4learning/scheme/Organizations',
       
   543     'audience': '',
       
   544     'language': 'http://www.iiep.unesco.org/plan4learning/scheme/Languages',
       
   545     'type': 'http://www.iiep.unesco.org/plan4learning/scheme/DocumentType',
       
   546     'subject': 'http://skos.um.es/unescothes/CS000',
       
   547     'theme': 'http://www.iiep.unesco.org/plan4learning/scheme/Themes',
       
   548     'country': 'http://skos.um.es/unescothes/CS000/Countries',    
       
   549     'project': 'http://www.iiep.unesco.org/plan4learning/scheme/Projects'
   525 }
   550 }
   526 
   551 
   527 REST_FRAMEWORK = {
   552 REST_FRAMEWORK = {
   528     # Use hyperlinked styles by default.
   553     # Use hyperlinked styles by default.
   529     # Only used if the `serializer_class` attribute is not set on a view.
   554     # Only used if the `serializer_class` attribute is not set on a view.