mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-05 06:04:47 +00:00
Ready check now considers AXES_CACHE setting
This commit is contained in:
parent
0345245e32
commit
a8b53667ed
1 changed files with 4 additions and 2 deletions
|
|
@ -8,8 +8,10 @@ class AppConfig(apps.AppConfig):
|
|||
from django.conf import settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
if settings.CACHES['default']['BACKEND'] == 'django.core.cache.backends.locmem.LocMemCache':
|
||||
raise ImproperlyConfigured('django-axes does not work properly with LocMemCache as the default cache backend')
|
||||
if settings.CACHES[getattr(settings, 'AXES_CACHE', 'default')]['BACKEND'] == \
|
||||
'django.core.cache.backends.locmem.LocMemCache':
|
||||
raise ImproperlyConfigured(
|
||||
'django-axes does not work properly with LocMemCache as the default cache backend')
|
||||
|
||||
from django.contrib.auth.views import LoginView
|
||||
from django.utils.decorators import method_decorator
|
||||
|
|
|
|||
Loading…
Reference in a new issue