Mercurial > public > bravenewsurf
view bns_website/settings/local.py @ 27:a5e8741452a3
Add path to Django in WSGI file.
Use Django's simplesjon module as it will either import the Python system one if it exists, or use the one provided with Django as a fallback. This is needed for the production server, which is running Python 2.5.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 01 Nov 2011 20:15:21 -0500 |
parents | d5f3bb516fd3 |
children |
line wrap: on
line source
# Django local settings for bns_website project. from settings.base import * DEBUG = True TEMPLATE_DEBUG = DEBUG MEDIA_URL = '/media/' STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = '/static/admin/' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'bravenewsurf', 'USER': SECRETS['DB_USER'], 'PASSWORD': SECRETS['DB_PASSWORD'], }, } LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { 'verbose': { 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s' }, 'simple': { 'format': '%(asctime)s %(levelname)s %(message)s' }, }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', 'level': 'DEBUG', 'formatter': 'simple', }, 'file': { 'class': 'logging.handlers.RotatingFileHandler', 'level': 'DEBUG', 'formatter': 'simple', 'filename': os.path.join(PROJECT_PATH, 'logs', 'bns.log'), 'mode': 'a', 'maxBytes': 100 * 1024, 'backupCount': 10, }, 'mail_admins': { 'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR', 'formatter': 'simple', }, }, 'loggers': { 'django':{ 'level': 'WARNING', 'propagate': False, 'handlers': ['file'], }, }, 'root': { 'level': 'DEBUG', 'handlers': ['file'], }, } # Django Debug Toolbar support if DEBUG: try: import debug_toolbar except ImportError: pass else: i = MIDDLEWARE_CLASSES.index('django.middleware.common.CommonMiddleware') MIDDLEWARE_CLASSES.insert(i + 1, 'debug_toolbar.middleware.DebugToolbarMiddleware') INTERNAL_IPS = ['127.0.0.1'] INSTALLED_APPS.append('debug_toolbar')