Permalink
Browse files

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
  • Loading branch information...
1 parent bb1cb76 commit 27c49b69b83a036cef1d19c6eb80b93cb2275b39 @adrianholovaty adrianholovaty committed Jul 21, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/middleware/cache.py
View
2 django/middleware/cache.py
@@ -36,7 +36,7 @@ def __init__(self, cache_timeout=None, key_prefix=None, cache_anonymous_only=Non
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

0 comments on commit 27c49b6

Please sign in to comment.