Skip to content

Commit

Permalink
Update settings according to deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Feb 6, 2013
1 parent c181344 commit af4608e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions django_www/settings.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
TIME_ZONE = 'America/Chicago' TIME_ZONE = 'America/Chicago'
SERVER_EMAIL = 'root@djangoproject.com' SERVER_EMAIL = 'root@djangoproject.com'


CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}

DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
Expand Down Expand Up @@ -50,11 +57,10 @@
if PRODUCTION: if PRODUCTION:
DEBUG = False DEBUG = False
PREPEND_WWW = True PREPEND_WWW = True
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
else: else:
DEBUG = True DEBUG = True
PREPEND_WWW = False PREPEND_WWW = False
CACHE_BACKEND = "dummy:///" CACHES['default']['BACKEND'] = 'django.core.cache.backends.dummy.DummyCache'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'


SITE_ID = 1 SITE_ID = 1
Expand Down Expand Up @@ -127,11 +133,17 @@
"disable_existing_loggers": True, "disable_existing_loggers": True,
"formatters": { "formatters": {
"simple": {"format": "[%(name)s] %(levelname)s: %(message)s"}, "simple": {"format": "[%(name)s] %(levelname)s: %(message)s"},
"full": {"format": "%(asctime)s [%(name)s] %(levelname)s: %(message)s"} "full": {"format": "%(asctime)s [%(name)s] %(levelname)s: %(message)s"},
},
"filters": {
"require_debug_false": {
"()": "django.utils.log.RequireDebugFalse",
},
}, },
"handlers": { "handlers": {
"mail_admins": { "mail_admins": {
"level": "ERROR", "level": "ERROR",
"filters": ['require_debug_false'],
"class": "django.utils.log.AdminEmailHandler", "class": "django.utils.log.AdminEmailHandler",
}, },
"console": { "console": {
Expand All @@ -149,7 +161,7 @@
"django_website": { "django_website": {
"handlers": ["console"], "handlers": ["console"],
"level": "DEBUG", "level": "DEBUG",
} },
} }
} }
if PRODUCTION: if PRODUCTION:
Expand Down

0 comments on commit af4608e

Please sign in to comment.