mirror of https://github.com/django/django.git
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:
parent
bb1cb76dfb
commit
27c49b69b8
|
@ -36,7 +36,7 @@ class CacheMiddleware(object):
|
||||||
if key_prefix is None:
|
if key_prefix is None:
|
||||||
self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX
|
self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX
|
||||||
if cache_anonymous_only is None:
|
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:
|
else:
|
||||||
self.cache_anonymous_only = cache_anonymous_only
|
self.cache_anonymous_only = cache_anonymous_only
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue