annotate bns_website/settings/production.py @ 108:9ca05ec9b64e tip

Update buy links.
author Brian Neal <bgneal@gmail.com>
date Sat, 27 Sep 2014 12:36:06 -0500
parents b6b072795990
children
rev   line source
bgneal@26 1 # Django production settings for bns_website project.
bgneal@26 2
bgneal@26 3 from settings.base import *
bgneal@26 4
bgneal@26 5 DEBUG = False
bgneal@26 6 TEMPLATE_DEBUG = DEBUG
bgneal@26 7
bgneal@101 8 ALLOWED_HOSTS = ['.bravenewsurf.com']
bgneal@101 9
bgneal@26 10 DATABASES = {
bgneal@26 11 'default': {
bgneal@26 12 'ENGINE': 'django.db.backends.mysql',
bgneal@26 13 'NAME': 'bravenewsurf',
bgneal@26 14 'USER': SECRETS['DB_USER'],
bgneal@26 15 'PASSWORD': SECRETS['DB_PASSWORD'],
bgneal@26 16 },
bgneal@26 17 }
bgneal@26 18
bgneal@92 19 TEMPLATE_LOADERS = [
bgneal@92 20 ('django.template.loaders.cached.Loader', (
bgneal@92 21 'django.template.loaders.filesystem.Loader',
bgneal@92 22 'django.template.loaders.app_directories.Loader',
bgneal@92 23 )),
bgneal@92 24 ]
bgneal@92 25
bgneal@82 26 CACHES = {
bgneal@82 27 'default': {
bgneal@82 28 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
bgneal@82 29 'LOCATION': '127.0.0.1:11211',
bgneal@82 30 'TIMEOUT': 600,
bgneal@82 31 },
bgneal@82 32 }
bgneal@82 33
bgneal@82 34 CACHE_MIDDLEWARE_ALIAS = 'default'
bgneal@82 35 CACHE_MIDDLEWARE_SECONDS = 600
bgneal@82 36 CACHE_MIDDLEWARE_KEY_PREFIX = 'BNS'
bgneal@82 37 CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
bgneal@82 38
bgneal@82 39 MIDDLEWARE_CLASSES.insert(0, 'django.middleware.cache.UpdateCacheMiddleware')
bgneal@82 40 MIDDLEWARE_CLASSES.append('django.middleware.cache.FetchFromCacheMiddleware')
bgneal@82 41
bgneal@26 42 LOGGING = {
bgneal@26 43 'version': 1,
bgneal@26 44 'disable_existing_loggers': True,
bgneal@26 45 'formatters': {
bgneal@26 46 'verbose': {
bgneal@26 47 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s'
bgneal@26 48 },
bgneal@26 49 'simple': {
bgneal@26 50 'format': '%(asctime)s %(levelname)s %(message)s'
bgneal@26 51 },
bgneal@26 52 },
bgneal@26 53 'handlers': {
bgneal@26 54 'console': {
bgneal@26 55 'class': 'logging.StreamHandler',
bgneal@26 56 'level': 'DEBUG',
bgneal@26 57 'formatter': 'simple',
bgneal@26 58 },
bgneal@26 59 'file': {
bgneal@26 60 'class': 'logging.handlers.RotatingFileHandler',
bgneal@26 61 'level': 'DEBUG',
bgneal@26 62 'formatter': 'simple',
bgneal@26 63 'filename': os.path.join(PROJECT_PATH, 'logs', 'bns.log'),
bgneal@26 64 'mode': 'a',
bgneal@26 65 'maxBytes': 100 * 1024,
bgneal@26 66 'backupCount': 10,
bgneal@26 67 },
bgneal@26 68 'mail_admins': {
bgneal@26 69 'class': 'django.utils.log.AdminEmailHandler',
bgneal@26 70 'level': 'ERROR',
bgneal@26 71 'formatter': 'simple',
bgneal@26 72 },
bgneal@26 73 },
bgneal@26 74 'loggers': {
bgneal@26 75 'django':{
bgneal@26 76 'level': 'ERROR',
bgneal@26 77 'propagate': False,
bgneal@26 78 'handlers': ['file'],
bgneal@26 79 },
bgneal@26 80 },
bgneal@26 81 'root': {
bgneal@26 82 'level': 'DEBUG',
bgneal@26 83 'handlers': ['file'],
bgneal@26 84 },
bgneal@26 85 }