chrono/scripts/runuwsgi_settings.py

47 lines
1.2 KiB
Python

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'chrono-runserver',
}
}
LOGGING = {
'version': 1,
'formatters': {
'stream': {
'format': '%(asctime)s %(levelname)s %(name)s: %(message)s',
'datefmt': '%Y-%m-%d %a %H:%M:%S',
},
},
'handlers': {
'stream': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'formatter': 'stream',
# fd3 is redirected to stdout in scripts/uwsgi.sh
# to prevent logs to go to uwsgi log file.
'filename': '/dev/fd/3',
},
},
'loggers': {
# even when debugging seeing SQL queries is too much, activate it
# explicitly using DEBUG_DB
'django.db': {
'level': 'INFO',
'handlers': [],
'propagate': True,
},
'django': {
'level': 'INFO',
'handlers': [],
'propagate': True,
},
'': {
'handlers': ['stream'],
'level': 'INFO',
},
},
}
MIDDLEWARE = list(MIDDLEWARE) + ['testapp.MaDbgMiddleware']