mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-04 13:44:46 +00:00
Fix problem with Django Admin -> It always uses username as the username field
This commit is contained in:
parent
efc02327f3
commit
41b532c882
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ def get_client_username(request, credentials=None):
|
|||
if settings.AXES_USERNAME_CALLABLE:
|
||||
return settings.AXES_USERNAME_CALLABLE(request, credentials)
|
||||
if credentials is None:
|
||||
return request.POST.get(settings.AXES_USERNAME_FORM_FIELD, None)
|
||||
return request.POST.get('username', None)
|
||||
return credentials.get(settings.AXES_USERNAME_FORM_FIELD, None)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue