democrasite.users.forms module

Override forms from allauth.

class democrasite.users.forms.DisabledChangePasswordForm(*args, **kwargs)

Bases: ChangePasswordForm

Substitute 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: ResetPasswordForm

Substitute 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: ResetPasswordKeyForm

Substitute 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: SetPasswordForm

Substitute 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: UserChangeForm

Override UserChangeForm to use custom User model.

Form fields:

property media

Return all media required to render the widgets on this form.

class democrasite.users.forms.UserAdminCreationForm(*args, **kwargs)

Bases: AdminUserCreationForm

Override 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.