Class LoginView
Display the login form and handle the login action.
Declaration
source linkDocumentation
Methods
▶ def dispatch(self, request, *args, **kwargs) override 3 decorators @method_decorator(sensitive_post_parameters())
@method_decorator(csrf_protect)
@method_decorator(never_cache)
def dispatch(
self,
request,
*args,
**kwargs,
)
This method overrides django.views.generic.base.View.dispatch.
▶ def form_valid(self, form) override Security check complete. Log the user in.
▶ def get_context_data(self, **kwargs) overrideinherited doc Insert the form into the context dict.
▶ def get_form_class(self) overrideinherited doc Return the form class to use.
▶ def get_form_kwargs(self) overrideinherited doc Return the keyword arguments for instantiating the form.
▷ def get_redirect_url(self) Return the user-originating redirect URL if it's safe.
▶ def get_success_url(self) overrideinherited doc Return the URL to redirect to after processing a valid form.