Authentication
This package contains views related to registration, login, logout and password reset
Password Reset Confirm View
- class ycms.cms.views.authentication.password_reset_confirm_view.PasswordResetConfirmView(**kwargs)
Bases:
PasswordResetConfirmViewView to set a new password.
- dispatch(*args, **kwargs)
The view part of the view. Handles all HTTP methods equally.
- Parameters:
- Returns:
The rendered template response or a redirection to the login page
- Return type:
- form_valid(form)
If the form is valid, show a success message.
- Parameters:
form (SetPasswordForm) – The supplied form
- Returns:
form validation
- Return type:
- success_url = '/accounts/login/'
- template_name = 'authentication/password_reset_confirm.html'
- token_generator = <ycms.cms.utils.token_generator.CustomPasswordResetTokenGenerator object>
Password Reset Request View
- class ycms.cms.views.authentication.password_reset_request_view.PasswordResetRequestView(**kwargs)
Bases:
FormViewView allowing users to request a password reset
- form_class
alias of
PasswordResetRequestForm
- form_valid(form)
Overwrite the form_valid method to additionally send a reset email
- Parameters:
form (RegistrationForm) – The user-submitted form
- success_url = '/accounts/login/'
- template_name = 'authentication/password_reset_request.html'
Registration View
- class ycms.cms.views.authentication.registration_view.RegistrationView(**kwargs)
Bases:
CreateViewView allowing new users to sign up as offer providers
- dispatch(request, *args, **kwargs)
- form_class
alias of
RegistrationForm
- form_valid(form)
Overwrite the form_valid method to additionally send a confirmation email
- Parameters:
form (RegistrationForm) – The user-submitted form
- get_form_kwargs()
Return the keyword arguments for instantiating the form
- Returns:
The form kwargs
- Return type:
- success_url = '/accounts/create-user/'
- template_name = 'authentication/create_user.html'