djangoemailreset-password

Is there a way to use Django's default password reset without sending reset link via email?


Is there a way to use django's inbuilt password reset function without sending reset links via email or without the email option. I am currently developing a simple system with a few number of users on which sending emails are not needed.Thanks in advance


Solution

  • You can change password with forms and in the views.py use the function

    make_password()

    if passwordForm.is_valid():
        password = passwordForm.cleaned_data['password']
        request.user.password = make_password(password)
        request.user.save()
    

    [make_password][1]https://docs.djangoproject.com/en/1.11/topics/auth/passwords/