fix deprecation warning about get_cache()

Since Django 1.8 get_cache() is deprecated in favor of caches[].
This commit is contained in:
Benjamin Dauvergne 2016-10-21 20:53:33 +02:00
parent c64df77a6e
commit ae6ddcc35e
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ from django.utils.translation import ugettext as _
from django.utils.http import is_safe_url, urlencode
from django.conf import settings
from django.core import signing
from django.core.cache import InvalidCacheBackendError, get_cache
from django.core.cache import InvalidCacheBackendError, caches
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.forms import Form
@ -52,9 +52,9 @@ class LoggerMixin(object):
super(LoggerMixin, *args, **kwargs)
try:
cache = get_cache('fc')
cache = caches['fc']
except InvalidCacheBackendError:
cache = get_cache('default')
cache = caches['default']
CACHE_TIMEOUT = 60