Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/middleware/cache.py
2  django/middleware/cache.py
@@ -36,7 +36,7 @@ def __init__(self, cache_timeout=None, key_prefix=None, cache_anonymous_only=Non
36 36
         if key_prefix is None:
37 37
             self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX
38 38
         if cache_anonymous_only is None:
39  
-            self.cache_anonymous_only = settings.get('CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False)
  39
+            self.cache_anonymous_only = getattr(settings, 'CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False)
40 40
         else:
41 41
             self.cache_anonymous_only = cache_anonymous_only
42 42
 

0 notes on commit 27c49b6

Please sign in to comment.
Something went wrong with that request. Please try again.