mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Support for floats in cooloff time (i.e: 0.1 == 6 minutes)
This commit is contained in:
parent
9e7b1f9767
commit
a8cd749bd2
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ BEHIND_REVERSE_PROXY = getattr(settings, 'AXES_BEHIND_REVERSE_PROXY', False)
|
|||
REVERSE_PROXY_HEADER = getattr(settings, 'AXES_REVERSE_PROXY_HEADER', 'HTTP_X_FORWARDED_FOR')
|
||||
|
||||
COOLOFF_TIME = getattr(settings, 'AXES_COOLOFF_TIME', None)
|
||||
if isinstance(COOLOFF_TIME, int):
|
||||
if (isinstance(COOLOFF_TIME, int) or isinstance(COOLOFF_TIME, float) ):
|
||||
COOLOFF_TIME = timedelta(hours=COOLOFF_TIME)
|
||||
|
||||
LOGGER = getattr(settings, 'AXES_LOGGER', 'axes.watch_login')
|
||||
|
|
|
|||
Loading…
Reference in a new issue