Created
March 11, 2021 14:46
-
-
Save 4heck/7f462f04b181b0fb4e68ef9546072cb9 to your computer and use it in GitHub Desktop.
forgot_password_snippet.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
try: | |
user = User.objects.get(email=request.data["email"]) | |
except User.DoesNotExist: | |
raise ValidationError(_("No account found with this email")) | |
request.user = user | |
send_email_forgot_password(request) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment