# HG changeset patch # User cavaliet # Date 1402994943 -7200 # Node ID 0fa407857df268fd46bd2786b8d2fe0a70f45913 # Parent 1c774f7a0341a6d92e89a97dada2825a5784be25 update config template diff -r 1c774f7a0341 -r 0fa407857df2 src/hdabo/config.py.tmpl --- a/src/hdabo/config.py.tmpl Tue Jun 17 10:32:57 2014 +0200 +++ b/src/hdabo/config.py.tmpl Tue Jun 17 10:49:03 2014 +0200 @@ -42,14 +42,68 @@ } } -#HAYSTACK_SEARCH_ENGINE = 'whoosh' -#HAYSTACK_WHOOSH_PATH = os.path.abspath(BASE_DIR + "../index/").rstrip("/")+"/" + + HAYSTACK_CONNECTIONS = { 'default': { + # the elasticsearch_backend is probably temporary #'ENGINE': 'hdabo.search.french_whoosh_backend.SearchBackend', 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', - 'URL': '', - 'INDEX_NAME': '' + 'URL': 'http://127.0.0.1:9200/', + 'INDEX_NAME': 'hdabo', }, } + +LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../../run/log/log.txt")) +LOG_LEVEL = logging.DEBUG +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters' : { + 'simple' : { + 'format': "%(asctime)s - %(levelname)s : %(message)s", + }, + 'semi-verbose': { + 'format': '%(levelname)s %(asctime)s %(module)s %(message)s' + }, + }, + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'class': 'django.utils.log.AdminEmailHandler' + }, + 'stream_to_console': { + 'level': LOG_LEVEL, + 'class': 'logging.StreamHandler' + }, + 'file': { + 'level': LOG_LEVEL, + 'class': 'logging.FileHandler', + 'filename': LOG_FILE, + 'formatter': 'semi-verbose', + }, + } , + 'loggers': { + 'hdabo': { + 'handlers': ['file'], + 'level': LOG_LEVEL, + 'propagate': True, + }, + 'hdalab': { + 'handlers': ['file'], + 'level': LOG_LEVEL, + 'propagate': True, + }, +# 'django.db.backends':{ +# 'handlers': ['file'], +# 'level': LOG_LEVEL, +# 'propagate': True, +# }, +# 'django.request': { +# 'handlers': ['file'], +# 'level': LOG_LEVEL, +# 'propagate': True, +# }, + } +}