Mercurial > public > sg101
comparison gpp/settings/local.py @ 499:1a09a7bea000
For #236, switch to a settings package scheme.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 30 Nov 2011 02:41:18 +0000 |
parents | |
children | abc4be5a82e5 |
comparison
equal
deleted
inserted
replaced
498:b137a0966e4b | 499:1a09a7bea000 |
---|---|
1 """ | |
2 Local Django settings. | |
3 | |
4 """ | |
5 from settings.base import * | |
6 | |
7 DEBUG = True | |
8 | |
9 DATABASES = { | |
10 'default': { | |
11 'ENGINE': 'django.db.backends.mysql', | |
12 'NAME': 'gremmies_portal', | |
13 'USER': SECRETS['DB_USER'], | |
14 'PASSWORD': SECRETS['DB_PASSWORD'], | |
15 }, | |
16 } | |
17 | |
18 # Django Debug Toolbar support | |
19 if DEBUG: | |
20 try: | |
21 import debug_toolbar | |
22 except ImportError: | |
23 pass | |
24 else: | |
25 i = MIDDLEWARE_CLASSES.index('django.middleware.common.CommonMiddleware') | |
26 MIDDLEWARE_CLASSES.insert(i + 1, | |
27 'debug_toolbar.middleware.DebugToolbarMiddleware') | |
28 INSTALLED_APPS.append('debug_toolbar') | |
29 DEBUG_TOOLBAR_CONFIG = { | |
30 'INTERCEPT_REDIRECTS': True, | |
31 } | |
32 | |
33 # Path to elsewhere application static images | |
34 STATICFILES_DIRS.append(('elsewhere', | |
35 '/home/brian/coding/python/django/3rdparty/elsewhere/img')) | |
36 | |
37 # Logging configuration | |
38 | |
39 LOGGING = { | |
40 'version': 1, | |
41 'disable_existing_loggers': True, | |
42 'formatters': { | |
43 'verbose': { | |
44 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s' | |
45 }, | |
46 'simple': { | |
47 'format': '%(asctime)s %(levelname)s %(message)s' | |
48 }, | |
49 }, | |
50 'handlers': { | |
51 'console': { | |
52 'class': 'logging.StreamHandler', | |
53 'level': 'DEBUG', | |
54 'formatter': 'simple', | |
55 }, | |
56 'file': { | |
57 'class': 'logging.handlers.RotatingFileHandler', | |
58 'level': 'DEBUG', | |
59 'formatter': 'simple', | |
60 'filename': os.path.join(PROJECT_PATH, 'logs', 'sg101.log'), | |
61 'mode': 'a', | |
62 'maxBytes': 100 * 1024, | |
63 'backupCount': 10, | |
64 }, | |
65 'mail_admins': { | |
66 'class': 'django.utils.log.AdminEmailHandler', | |
67 'level': 'ERROR', | |
68 'formatter': 'simple', | |
69 }, | |
70 }, | |
71 'loggers': { | |
72 'django':{ | |
73 'level': 'WARNING', | |
74 'propagate': False, | |
75 'handlers': ['file'], | |
76 }, | |
77 }, | |
78 'root': { | |
79 'level': 'DEBUG', | |
80 'handlers': ['file'], | |
81 }, | |
82 } |