From 01605d0b9e212ee4bc6241c7a7b233c974eb23c2 Mon Sep 17 00:00:00 2001 From: Felix Sargent Date: Thu, 25 Jul 2024 11:13:53 -0700 Subject: [PATCH] Use allauth option not custom form to not require double password entry. --- approval_polls/forms.py | 11 ----------- approval_polls/settings.py | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/approval_polls/forms.py b/approval_polls/forms.py index c9ea0c7..7fb5c96 100644 --- a/approval_polls/forms.py +++ b/approval_polls/forms.py @@ -90,14 +90,3 @@ def clean(self): else: msg = "This field is required." self.add_error("zipcode", msg) - - -class CustomSignupForm(SignupForm): - def __init__(self, *args, **kwargs): - super(CustomSignupForm, self).__init__(*args, **kwargs) - del self.fields["password2"] - - def save(self, request): - # Ensure you don't need to use password2 in the save method - user = super(CustomSignupForm, self).save(request) - return user diff --git a/approval_polls/settings.py b/approval_polls/settings.py index 0c422d3..bf4ebaa 100644 --- a/approval_polls/settings.py +++ b/approval_polls/settings.py @@ -283,4 +283,4 @@ ACCOUNT_DEFAULT_HTTP_PROTOCOL = env( "ACCOUNT_DEFAULT_HTTP_PROTOCOL", str, default="https" ) -ACCOUNT_FORMS = {"signup": "approval_polls.forms.CustomSignupForm"} +ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False