Forms#

class user.forms.AuthForm(request=None, *args, **kwargs)[source]#

Custom authentication form.

This form extends the default AuthenticationForm provided by Django.

Attributes:

username (CharField): Field for entering the username. password (PasswordInput): Field for entering the password securely (masked).

Inherits:

AuthenticationForm: Base authentication form provided by Django.

Note:

This class overrides the username field to allow customizations.

property media#

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

class user.forms.RegistrationForm(*args, **kwargs)[source]#

Form for user registration.

This form extends the default UserCreationForm provided by Django for user registration.

Meta:

model (User): The user model for which the form is created. fields (list): List of fields to be included in the form, including “username”, “password1”, and “password2”.

Inherits:

UserCreationForm: Base form provided by Django for user registration.

property media#

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