mirror of
https://github.com/jazzband/django-defender.git
synced 2026-05-20 13:21:57 +00:00
Fix line length meet PEP8
This commit is contained in:
parent
b583f6f54f
commit
319027c1e6
2 changed files with 4 additions and 2 deletions
|
|
@ -15,7 +15,8 @@ MOCK_REDIS = get_setting('DEFENDER_MOCK_REDIS', False)
|
|||
# see if the user has overridden the failure limit
|
||||
FAILURE_LIMIT = get_setting('DEFENDER_LOGIN_FAILURE_LIMIT', 3)
|
||||
|
||||
LOCKOUT_BY_IP_USERNAME = get_setting('DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME', False)
|
||||
LOCKOUT_BY_IP_USERNAME = get_setting(
|
||||
'DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME', False)
|
||||
|
||||
# use a specific username field to retrieve from login POST data
|
||||
USERNAME_FORM_FIELD = get_setting('DEFENDER_USERNAME_FORM_FIELD', 'username')
|
||||
|
|
|
|||
|
|
@ -253,7 +253,8 @@ def is_already_locked(request):
|
|||
if config.LOCKOUT_BY_IP_USERNAME:
|
||||
LOG.info("Block by ip & username")
|
||||
if ip_blocked and user_blocked:
|
||||
# if both this IP and this username are present the reqeust is blocked
|
||||
# if both this IP and this username are present the request is
|
||||
# blocked
|
||||
return True
|
||||
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue