bgneal@499: """ bgneal@499: Local Django settings. bgneal@499: bgneal@499: """ bgneal@499: from settings.base import * bgneal@499: bgneal@499: DEBUG = True bgneal@499: bgneal@499: DATABASES = { bgneal@499: 'default': { bgneal@499: 'ENGINE': 'django.db.backends.mysql', bgneal@499: 'NAME': 'gremmies_portal', bgneal@499: 'USER': SECRETS['DB_USER'], bgneal@499: 'PASSWORD': SECRETS['DB_PASSWORD'], bgneal@499: }, bgneal@499: } bgneal@499: bgneal@499: # Django Debug Toolbar support bgneal@499: if DEBUG: bgneal@499: try: bgneal@499: import debug_toolbar bgneal@499: except ImportError: bgneal@499: pass bgneal@499: else: bgneal@499: i = MIDDLEWARE_CLASSES.index('django.middleware.common.CommonMiddleware') bgneal@499: MIDDLEWARE_CLASSES.insert(i + 1, bgneal@499: 'debug_toolbar.middleware.DebugToolbarMiddleware') bgneal@499: INSTALLED_APPS.append('debug_toolbar') bgneal@499: DEBUG_TOOLBAR_CONFIG = { bgneal@499: 'INTERCEPT_REDIRECTS': True, bgneal@499: } bgneal@499: bgneal@499: # Path to elsewhere application static images bgneal@499: STATICFILES_DIRS.append(('elsewhere', bgneal@499: '/home/brian/coding/python/django/3rdparty/elsewhere/img')) bgneal@499: bgneal@499: # Logging configuration bgneal@499: bgneal@499: LOGGING = { bgneal@499: 'version': 1, bgneal@499: 'disable_existing_loggers': True, bgneal@499: 'formatters': { bgneal@499: 'verbose': { bgneal@499: 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s' bgneal@499: }, bgneal@499: 'simple': { bgneal@499: 'format': '%(asctime)s %(levelname)s %(message)s' bgneal@499: }, bgneal@499: }, bgneal@499: 'handlers': { bgneal@499: 'console': { bgneal@499: 'class': 'logging.StreamHandler', bgneal@499: 'level': 'DEBUG', bgneal@499: 'formatter': 'simple', bgneal@499: }, bgneal@499: 'file': { bgneal@499: 'class': 'logging.handlers.RotatingFileHandler', bgneal@499: 'level': 'DEBUG', bgneal@499: 'formatter': 'simple', bgneal@499: 'filename': os.path.join(PROJECT_PATH, 'logs', 'sg101.log'), bgneal@499: 'mode': 'a', bgneal@499: 'maxBytes': 100 * 1024, bgneal@499: 'backupCount': 10, bgneal@499: }, bgneal@499: 'mail_admins': { bgneal@499: 'class': 'django.utils.log.AdminEmailHandler', bgneal@499: 'level': 'ERROR', bgneal@499: 'formatter': 'simple', bgneal@499: }, bgneal@499: }, bgneal@499: 'loggers': { bgneal@499: 'django':{ bgneal@499: 'level': 'WARNING', bgneal@499: 'propagate': False, bgneal@499: 'handlers': ['file'], bgneal@499: }, bgneal@499: }, bgneal@499: 'root': { bgneal@499: 'level': 'DEBUG', bgneal@499: 'handlers': ['file'], bgneal@499: }, bgneal@499: }