Skip to content

Commit

Permalink
docs(users): Tweak the docstring for the CustomPasswordResetForm class
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Jun 21, 2023
1 parent 1aba9f9 commit 906a1d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bc/users/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ class EmailConfirmationForm(forms.Form):


class CustomPasswordResetForm(PasswordResetForm):
"""A simple subclassing of a Django form in order to change class
attributes.
"""
Tweaks the PasswordResetForm class to ensure we send a message
even if we don't find an account with the recipient address
"""

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def save(self, *args, **kwargs) -> None:
"""Override the usual password form to send a message if we don't find
"""Override the usual save method to send a message if we don't find
any accounts
"""
recipient_addr = self.cleaned_data["email"]
Expand Down

0 comments on commit 906a1d1

Please sign in to comment.