bgneal@499: """ bgneal@499: Production Django settings. bgneal@499: bgneal@499: """ bgneal@499: from settings.base import * bgneal@499: bgneal@499: DEBUG = False 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: # Path to elsewhere application static images bgneal@499: STATICFILES_DIRS.append(('elsewhere', bgneal@511: '/home/var/django-sites/virtualenvs/sg101/src/django-elsewhere/elsewhere/img')) bgneal@499: bgneal@499: STATIC_ROOT = os.path.abspath(os.path.join(PROJECT_PATH, '..', 'static_serve')) bgneal@499: bgneal@499: # Used cached template loader bgneal@499: TEMPLATE_LOADERS = [ bgneal@499: ('django.template.loaders.cached.Loader', ( bgneal@499: 'django.template.loaders.filesystem.Loader', bgneal@499: 'django.template.loaders.app_directories.Loader', bgneal@499: )), bgneal@499: ] bgneal@499: bgneal@499: CACHES = { bgneal@499: 'default': { bgneal@499: 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', bgneal@499: 'LOCATION': '127.0.0.1:11211', bgneal@499: 'TIMEOUT': 600, bgneal@499: }, bgneal@499: } bgneal@499: CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True bgneal@499: CACHE_MIDDLEWARE_SECONDS = 600 bgneal@499: CACHE_MIDDLEWARE_KEY_PREFIX = '' bgneal@499: bgneal@499: EMAIL_HOST = 'localhost' bgneal@499: EMAIL_PORT = 25 bgneal@512: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' bgneal@499: bgneal@499: DONATIONS_DEBUG = False 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: 'django.request':{ bgneal@499: 'level': 'ERROR', bgneal@499: 'propagate': True, bgneal@499: 'handlers': ['mail_admins'], bgneal@499: }, bgneal@499: }, bgneal@499: 'root': { bgneal@499: 'level': 'INFO', bgneal@499: 'handlers': ['file'], bgneal@499: }, bgneal@499: }