From 27c49b69b83a036cef1d19c6eb80b93cb2275b39 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 21 Jul 2006 14:41:38 +0000 Subject: [PATCH] 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 --- django/middleware/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/middleware/cache.py b/django/middleware/cache.py index 0d41713804..fc649d9c34 100644 --- a/django/middleware/cache.py +++ b/django/middleware/cache.py @@ -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