Fixed #2392 -- Fixed CACHE_MIDDLEWARE_ANONYMOUS_ONLY to use attribute access to django.conf.settings

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-07-21 14:41:38 +00:00
parent bb1cb76dfb
commit 27c49b69b8
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class CacheMiddleware(object):
if key_prefix is None:
self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX
if cache_anonymous_only is None:
self.cache_anonymous_only = settings.get('CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False)
self.cache_anonymous_only = getattr(settings, 'CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False)
else:
self.cache_anonymous_only = cache_anonymous_only