How to perform additional actions on PasswordReset in Django

18 views
Skip to first unread message

arriol...@gmail.com

unread,
May 7, 2019, 1:07:39 AM5/7/19
to Django users

I'm using django-axes for the locking of account when a user tries to enter credentials that are not recognized by the system, it will lock the account.


But when I do perform the password reset function using django auth package on a locked account, obviously there is no shortcut way to remove the lock of the account.


Even if the password is already reset, the account will still be locked by django-axes for a couple of minutes.


I'm trying to perform


python manage.py axes_reset_username


on the class PasswordResetCompleteView but I'm not sure how to access the username whose password was reset.

Sanjay Chandak

unread,
May 7, 2019, 11:48:11 AM5/7/19
to django...@googlegroups.com
Hi all,
I am new in the Django so I am not aware about the more functionality
of the django but instead you can go with the database approach.
If user provide wrong details just set "Locked" column in database as
1 and with some filter you can LOCK the account and at the time of
reset just set this column as 0.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/700dcec5-bce9-4d9a-8011-27ae091722ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
WITH REGARDS
Sanjay Chandak
student of MNNIT, Allahabad
ECE Department
Reply all
Reply to author
Forward
0 new messages