comparison bns_website/settings/production.py @ 26:6f68f6800843

For #5, make some tweaks to the files to prepare for production hosting.
author Brian Neal <bgneal@gmail.com>
date Tue, 01 Nov 2011 19:17:07 -0500
parents
children 0e1f1e8db2a5
comparison
equal deleted inserted replaced
25:72bfeac8f4f3 26:6f68f6800843
1 # Django production settings for bns_website project.
2
3 from settings.base import *
4
5 DEBUG = False
6 TEMPLATE_DEBUG = DEBUG
7
8 DATABASES = {
9 'default': {
10 'ENGINE': 'django.db.backends.mysql',
11 'NAME': 'bravenewsurf',
12 'USER': SECRETS['DB_USER'],
13 'PASSWORD': SECRETS['DB_PASSWORD'],
14 },
15 }
16
17 LOGGING = {
18 'version': 1,
19 'disable_existing_loggers': True,
20 'formatters': {
21 'verbose': {
22 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s'
23 },
24 'simple': {
25 'format': '%(asctime)s %(levelname)s %(message)s'
26 },
27 },
28 'handlers': {
29 'console': {
30 'class': 'logging.StreamHandler',
31 'level': 'DEBUG',
32 'formatter': 'simple',
33 },
34 'file': {
35 'class': 'logging.handlers.RotatingFileHandler',
36 'level': 'DEBUG',
37 'formatter': 'simple',
38 'filename': os.path.join(PROJECT_PATH, 'logs', 'bns.log'),
39 'mode': 'a',
40 'maxBytes': 100 * 1024,
41 'backupCount': 10,
42 },
43 'mail_admins': {
44 'class': 'django.utils.log.AdminEmailHandler',
45 'level': 'ERROR',
46 'formatter': 'simple',
47 },
48 },
49 'loggers': {
50 'django':{
51 'level': 'ERROR',
52 'propagate': False,
53 'handlers': ['file'],
54 },
55 },
56 'root': {
57 'level': 'DEBUG',
58 'handlers': ['file'],
59 },
60 }