Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update settings according to deprecation warnings.

  • Loading branch information...
commit af4608e980406f793a5959163c912e9c9a2df05b 1 parent c181344
@aaugustin aaugustin authored
Showing with 16 additions and 4 deletions.
  1. +16 −4 django_www/settings.py
View
20 django_www/settings.py
@@ -23,6 +23,13 @@
TIME_ZONE = 'America/Chicago'
SERVER_EMAIL = 'root@djangoproject.com'
+CACHES = {
+ 'default': {
+ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
+ 'LOCATION': '127.0.0.1:11211',
+ }
+}
+
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
@@ -50,11 +57,10 @@
if PRODUCTION:
DEBUG = False
PREPEND_WWW = True
- CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
else:
DEBUG = True
PREPEND_WWW = False
- CACHE_BACKEND = "dummy:///"
+ CACHES['default']['BACKEND'] = 'django.core.cache.backends.dummy.DummyCache'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
SITE_ID = 1
@@ -127,11 +133,17 @@
"disable_existing_loggers": True,
"formatters": {
"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": {
"mail_admins": {
"level": "ERROR",
+ "filters": ['require_debug_false'],
"class": "django.utils.log.AdminEmailHandler",
},
"console": {
@@ -149,7 +161,7 @@
"django_website": {
"handlers": ["console"],
"level": "DEBUG",
- }
+ },
}
}
if PRODUCTION:
Please sign in to comment.
Something went wrong with that request. Please try again.