diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-15 21:01:31 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-15 21:01:31 +0100 |
commit | eeaddb27560d723ca7d61359744ceb2709fccd2d (patch) | |
tree | 04ddbc49ae7b73d5f5a9e1716d7227aecd3b9f85 /pyblackbird_cc/users/forms.py | |
parent | 7a3044c859043837e6c7c95bb4894d04e9b2cbc2 (diff) |
Renamed from pyblackbird_cc to alphabetlearning - everywhere
Diffstat (limited to 'pyblackbird_cc/users/forms.py')
-rw-r--r-- | pyblackbird_cc/users/forms.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/pyblackbird_cc/users/forms.py b/pyblackbird_cc/users/forms.py deleted file mode 100644 index fe8a886..0000000 --- a/pyblackbird_cc/users/forms.py +++ /dev/null @@ -1,44 +0,0 @@ -from allauth.account.forms import SignupForm -from allauth.socialaccount.forms import SignupForm as SocialSignupForm -from django.contrib.auth import forms as admin_forms -from django.forms import EmailField -from django.utils.translation import gettext_lazy as _ - -from .models import User - - -class UserAdminChangeForm(admin_forms.UserChangeForm): - class Meta(admin_forms.UserChangeForm.Meta): - model = User - field_classes = {"email": EmailField} - - -class UserAdminCreationForm(admin_forms.UserCreationForm): - """ - Form for User Creation in the Admin Area. - To change user signup, see UserSignupForm and UserSocialSignupForm. - """ - - class Meta(admin_forms.UserCreationForm.Meta): - model = User - fields = ("email",) - field_classes = {"email": EmailField} - error_messages = { - "email": {"unique": _("This email has already been taken.")}, - } - - -class UserSignupForm(SignupForm): - """ - Form that will be rendered on a user sign up section/screen. - Default fields will be added automatically. - Check UserSocialSignupForm for accounts created from social. - """ - - -class UserSocialSignupForm(SocialSignupForm): - """ - Renders the form when user has signed up using social accounts. - Default fields will be added automatically. - See UserSignupForm otherwise. - """ |