Views#
- class user.views.DashboardView(**kwargs)[source]#
View for displaying the dashboard.
This class represents a view for displaying the user dashboard.
- Attributes:
template_name (str): The name of the template used for rendering the dashboard.
- class user.views.HealthCheckView(**kwargs)[source]#
A class-based view for the health check endpoint.
This view responds with an HTTP 200 OK status code when the application is healthy.
- class user.views.LoginView(**kwargs)[source]#
View for user login.
This class represents a view for user login, inheriting from the Django built-in LoginView.
- Attributes:
template_name (str): The name of the template used for rendering the login form. authentication_form (Form): The form class used for user authentication.
- form_invalid(form)[source]#
Handles invalid form submission.
This method handles the case when the login form submission is invalid, displaying an error message to the user.
- Args:
form (Form): The invalid form instance.
- Returns:
HttpResponse: The HTTP response with the rendered form and error message.
- class user.views.LogoutView(**kwargs)[source]#
View for user logout.
This class represents a view for user logout, inheriting from the Django built-in LogoutView.
- class user.views.RedirectView(**kwargs)[source]#
Redirect view.
This class is a simple redirection view, inheriting from the abstract RedirectView.
- class user.views.RegistrationView(**kwargs)[source]#
View for user registration.
This class represents a view for user registration, inheriting from the Django built-in CreateView.
- Attributes:
model (Model): The model class used for user registration. form_class (Form): The form class used for user registration. template_name (str): The name of the template used for rendering the registration form. success_url (str): The URL to redirect to after successful registration.
- form_class#
alias of
RegistrationForm