annotate bns_website/settings/local.py @ 1:134fbfc4acf6

Restructured settings as a directory to allow for different settings files. E.g. python manage.py runserver --settings=settings.local Load secret/sensitive information from settings/secrets.json, which will not be controlled in source control.
author Brian Neal <bgneal@gmail.com>
date Thu, 27 Oct 2011 20:01:37 -0500
parents
children 48ff23eab86a
rev   line source
bgneal@1 1 # Django local settings for bns_website project.
bgneal@1 2
bgneal@1 3 from settings.base import *
bgneal@1 4
bgneal@1 5 DEBUG = True
bgneal@1 6 TEMPLATE_DEBUG = DEBUG
bgneal@1 7
bgneal@1 8 MEDIA_URL = '/media/'
bgneal@1 9 STATIC_URL = '/static/'
bgneal@1 10 ADMIN_MEDIA_PREFIX = '/static/admin/'
bgneal@1 11
bgneal@1 12
bgneal@1 13 LOGGING = {
bgneal@1 14 'version': 1,
bgneal@1 15 'disable_existing_loggers': True,
bgneal@1 16 'formatters': {
bgneal@1 17 'verbose': {
bgneal@1 18 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s'
bgneal@1 19 },
bgneal@1 20 'simple': {
bgneal@1 21 'format': '%(asctime)s %(levelname)s %(message)s'
bgneal@1 22 },
bgneal@1 23 },
bgneal@1 24 'handlers': {
bgneal@1 25 'console': {
bgneal@1 26 'class': 'logging.StreamHandler',
bgneal@1 27 'level': 'DEBUG',
bgneal@1 28 'formatter': 'simple',
bgneal@1 29 },
bgneal@1 30 'file': {
bgneal@1 31 'class': 'logging.handlers.RotatingFileHandler',
bgneal@1 32 'level': 'DEBUG',
bgneal@1 33 'formatter': 'simple',
bgneal@1 34 'filename': os.path.join(PROJECT_PATH, 'logs', 'bns.log'),
bgneal@1 35 'mode': 'a',
bgneal@1 36 'maxBytes': 100 * 1024,
bgneal@1 37 'backupCount': 10,
bgneal@1 38 },
bgneal@1 39 'mail_admins': {
bgneal@1 40 'class': 'django.utils.log.AdminEmailHandler',
bgneal@1 41 'level': 'ERROR',
bgneal@1 42 'formatter': 'simple',
bgneal@1 43 },
bgneal@1 44 },
bgneal@1 45 'loggers': {
bgneal@1 46 'django':{
bgneal@1 47 'level': 'WARNING',
bgneal@1 48 'propagate': False,
bgneal@1 49 'handlers': ['file'],
bgneal@1 50 },
bgneal@1 51 },
bgneal@1 52 'root': {
bgneal@1 53 'level': 'DEBUG',
bgneal@1 54 'handlers': ['file'],
bgneal@1 55 },
bgneal@1 56 }