comparison bns_website/settings/local.py @ 1:134fbfc4acf6

Restructured settings as a directory to allow for different settings files. E.g. python manage.py runserver --settings=settings.local Load secret/sensitive information from settings/secrets.json, which will not be controlled in source control.
author Brian Neal <bgneal@gmail.com>
date Thu, 27 Oct 2011 20:01:37 -0500
parents
children 48ff23eab86a
comparison
equal deleted inserted replaced
0:c8881d9ca347 1:134fbfc4acf6
1 # Django local settings for bns_website project.
2
3 from settings.base import *
4
5 DEBUG = True
6 TEMPLATE_DEBUG = DEBUG
7
8 MEDIA_URL = '/media/'
9 STATIC_URL = '/static/'
10 ADMIN_MEDIA_PREFIX = '/static/admin/'
11
12
13 LOGGING = {
14 'version': 1,
15 'disable_existing_loggers': True,
16 'formatters': {
17 'verbose': {
18 'format': '%(asctime)s %(levelname)s %(module)s %(process)d %(thread)d %(message)s'
19 },
20 'simple': {
21 'format': '%(asctime)s %(levelname)s %(message)s'
22 },
23 },
24 'handlers': {
25 'console': {
26 'class': 'logging.StreamHandler',
27 'level': 'DEBUG',
28 'formatter': 'simple',
29 },
30 'file': {
31 'class': 'logging.handlers.RotatingFileHandler',
32 'level': 'DEBUG',
33 'formatter': 'simple',
34 'filename': os.path.join(PROJECT_PATH, 'logs', 'bns.log'),
35 'mode': 'a',
36 'maxBytes': 100 * 1024,
37 'backupCount': 10,
38 },
39 'mail_admins': {
40 'class': 'django.utils.log.AdminEmailHandler',
41 'level': 'ERROR',
42 'formatter': 'simple',
43 },
44 },
45 'loggers': {
46 'django':{
47 'level': 'WARNING',
48 'propagate': False,
49 'handlers': ['file'],
50 },
51 },
52 'root': {
53 'level': 'DEBUG',
54 'handlers': ['file'],
55 },
56 }