annotate bns_website/settings/local.py @ 36:1eb4b4072888

More useful to do a pull -u than an update in the fabric file.
author Brian Neal <bgneal@gmail.com>
date Sun, 06 Nov 2011 14:19:12 -0600
parents d5f3bb516fd3
children
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@6 12 DATABASES = {
bgneal@6 13 'default': {
bgneal@6 14 'ENGINE': 'django.db.backends.mysql',
bgneal@6 15 'NAME': 'bravenewsurf',
bgneal@6 16 'USER': SECRETS['DB_USER'],
bgneal@6 17 'PASSWORD': SECRETS['DB_PASSWORD'],
bgneal@6 18 },
bgneal@6 19 }
bgneal@1 20
bgneal@1 21 LOGGING = {
bgneal@1 22 'version': 1,
bgneal@1 23 'disable_existing_loggers': True,
bgneal@1 24 'formatters': {
bgneal@1 25 'verbose': {
bgneal@1 26 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s'
bgneal@1 27 },
bgneal@1 28 'simple': {
bgneal@1 29 'format': '%(asctime)s %(levelname)s %(message)s'
bgneal@1 30 },
bgneal@1 31 },
bgneal@1 32 'handlers': {
bgneal@1 33 'console': {
bgneal@1 34 'class': 'logging.StreamHandler',
bgneal@1 35 'level': 'DEBUG',
bgneal@1 36 'formatter': 'simple',
bgneal@1 37 },
bgneal@1 38 'file': {
bgneal@1 39 'class': 'logging.handlers.RotatingFileHandler',
bgneal@1 40 'level': 'DEBUG',
bgneal@1 41 'formatter': 'simple',
bgneal@1 42 'filename': os.path.join(PROJECT_PATH, 'logs', 'bns.log'),
bgneal@1 43 'mode': 'a',
bgneal@1 44 'maxBytes': 100 * 1024,
bgneal@1 45 'backupCount': 10,
bgneal@1 46 },
bgneal@1 47 'mail_admins': {
bgneal@1 48 'class': 'django.utils.log.AdminEmailHandler',
bgneal@1 49 'level': 'ERROR',
bgneal@1 50 'formatter': 'simple',
bgneal@1 51 },
bgneal@1 52 },
bgneal@1 53 'loggers': {
bgneal@1 54 'django':{
bgneal@1 55 'level': 'WARNING',
bgneal@1 56 'propagate': False,
bgneal@1 57 'handlers': ['file'],
bgneal@1 58 },
bgneal@1 59 },
bgneal@1 60 'root': {
bgneal@1 61 'level': 'DEBUG',
bgneal@1 62 'handlers': ['file'],
bgneal@1 63 },
bgneal@1 64 }
bgneal@11 65
bgneal@11 66 # Django Debug Toolbar support
bgneal@11 67 if DEBUG:
bgneal@11 68 try:
bgneal@11 69 import debug_toolbar
bgneal@11 70 except ImportError:
bgneal@11 71 pass
bgneal@11 72 else:
bgneal@11 73 i = MIDDLEWARE_CLASSES.index('django.middleware.common.CommonMiddleware')
bgneal@11 74 MIDDLEWARE_CLASSES.insert(i + 1,
bgneal@11 75 'debug_toolbar.middleware.DebugToolbarMiddleware')
bgneal@11 76 INTERNAL_IPS = ['127.0.0.1']
bgneal@11 77 INSTALLED_APPS.append('debug_toolbar')