From 176cb139666d153484b5da8b0794419c303b5960 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Wed, 21 Jun 2023 01:52:20 -0400 Subject: [PATCH] doc(users): Tweak the docstring for the CustomPasswordResetForm class --- bc/users/forms.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bc/users/forms.py b/bc/users/forms.py index 68184697..93e61e9b 100644 --- a/bc/users/forms.py +++ b/bc/users/forms.py @@ -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"]