X-Git-Url: https://git.openstreetmap.org/osqa.git/blobdiff_plain/dcacc3b4c2ba2f550806a2d22b183f6fac4f63ff..4fa3c66b3e0a937bb32bb0db81b0db81ab5aa206:/settings_local.py.dist diff --git a/settings_local.py.dist b/settings_local.py.dist index 31ad226..b85d89b 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -3,14 +3,33 @@ import os.path SITE_SRC_ROOT = os.path.dirname(__file__) LOG_FILENAME = 'django.osqa.log' - -#for logging -import logging -logging.basicConfig( - filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), - level=logging.ERROR, - format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s', -) +LOGGING = { + 'version': 1, + 'formatters': { + 'default': { + 'format': '%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s', + } + }, + 'handlers': { + 'file': { + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'formatter': 'default', + 'filename': os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), + }, + }, + 'loggers' : { + # ensure that all log entries are propagated to root + 'django': { 'propagate': True }, + 'django.request': { 'propagate': True }, + 'django.security': { 'propagate': True }, + 'py.warnings': { 'propagate': True }, + }, + 'root': { + 'handlers': ['file'], + 'level': 'DEBUG', + }, +} #ADMINS and MANAGERS ADMINS = () @@ -32,12 +51,18 @@ DATABASES = { 'PASSWORD': '', 'HOST': '', 'PORT': '', + 'CONN_MAX_AGE': 600, } } CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(__file__),'cache').replace('\\','/') #CACHE_BACKEND = 'dummy://' SESSION_ENGINE = 'django.contrib.sessions.backends.db' +# Customize the values below if OSQA is in a subfolder and especially you're planning on +# running multiple Django applications (OSQA or others) on the same domain in different +# subfolders +#SESSION_COOKIE_PATH = '/' +#CSRF_COOKIE_PATH = '/' # This should be equal to your domain name, plus the web application context. # This shouldn't be followed by a trailing slash. @@ -52,7 +77,6 @@ TIME_ZONE = 'America/New_York' USE_I18N = True LANGUAGE_CODE = 'en' -DJANGO_VERSION = 1.1 OSQA_DEFAULT_SKIN = 'default' -DISABLED_MODULES = ['books', 'recaptcha', 'project_badges'] +DISABLED_MODULES = ['books', 'recaptcha', 'project_badges', 'stats']