democrasite.users.forms module¶
Override forms from allauth.
- class democrasite.users.forms.DisabledChangePasswordForm(*args, **kwargs)¶
Bases:
ChangePasswordFormSubstitute form to disable password changes.
Form fields:
oldpassword: Current Password (PasswordField)password1: New Password (SetPasswordField)password2: New Password (again) (PasswordField)
- clean()¶
Always raise a validation error.
- property media¶
Return all media required to render the widgets on this form.
- class democrasite.users.forms.DisabledResetPasswordForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)¶
Bases:
ResetPasswordFormSubstitute form to disable password reset.
Form fields:
email: Email (EmailField)
- clean()¶
Always raise a validation error.
- property media¶
Return all media required to render the widgets on this form.
- class democrasite.users.forms.DisabledResetPasswordKeyForm(*args, **kwargs)¶
Bases:
ResetPasswordKeyFormSubstitute form to disable password reset.
Form fields:
password1: New Password (SetPasswordField)password2: New Password (again) (PasswordField)
- clean()¶
Always raise a validation error.
- property media¶
Return all media required to render the widgets on this form.
- class democrasite.users.forms.DisabledSetPasswordForm(*args, **kwargs)¶
Bases:
SetPasswordFormSubstitute form to disable password set.
Form fields:
password1: Password (SetPasswordField)password2: Password (again) (PasswordField)
- clean()¶
Always raise a validation error.
- property media¶
Return all media required to render the widgets on this form.
- class democrasite.users.forms.UserAdminChangeForm(*args, **kwargs)¶
Bases:
UserChangeFormOverride UserChangeForm to use custom User model.
Form fields:
password: Password (ReadOnlyPasswordHashField)last_login: Last login (DateTimeField)is_superuser: Superuser status (BooleanField)groups: Groups (ModelMultipleChoiceField)user_permissions: User permissions (ModelMultipleChoiceField)username: Username (UsernameField)email: Email address (EmailField)is_staff: Staff status (BooleanField)is_active: Active (BooleanField)date_joined: Date joined (DateTimeField)name: Name of User (CharField)
- property media¶
Return all media required to render the widgets on this form.
- class democrasite.users.forms.UserAdminCreationForm(*args, **kwargs)¶
Bases:
AdminUserCreationFormOverride UserCreationForm to use custom User model.
Form fields:
username: Username (UsernameField)password1: Password (CharField)password2: Password confirmation (CharField)usable_password: Password-based authentication (ChoiceField)
- property media¶
Return all media required to render the widgets on this form.