Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 27c49b69b83a036cef1d19c6eb80b93cb2275b39 1 parent bb1cb76
Adrian Holovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/middleware/cache.py
2  django/middleware/cache.py
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.