reviewboard.accounts.mixins¶
Mixins for account-related views.
- class CheckLoginRequiredViewMixin¶
Bases:
object
View mixin to check if a user needs to be logged in.
This is a convenience around using the
@check_login_required
decorator for class-based views.- dispatch(*args, **kwargs)¶
Dispatch a HTTP request to the right handler.
- Parameters:
- Returns:
The resulting HTTP response to send to the client.
- Return type:
- class LoginRequiredViewMixin¶
Bases:
object
View mixin to ensure a user is logged in.
This is a convenience around using the
@login_required
decorator for class-based views.- dispatch(*args, **kwargs)¶
Dispatch a HTTP request to the right handler.
- Parameters:
- Returns:
The resulting HTTP response to send to the client.
- Return type:
- class UserProfileRequiredViewMixin¶
Bases:
object
View mixin to ensure a user has a profile set up.
This is a convenience around using the
@valid_prefs_required
decorator for class-based views.- dispatch(*args, **kwargs)¶
Dispatch a HTTP request to the right handler.
- Parameters:
- Returns:
The resulting HTTP response to send to the client.
- Return type:
- class PolicyConsentFormMixin(*args, **kwargs)¶
Bases:
object
Form mixin to add consent to privacy policy and terms of service.
- __init__(*args, **kwargs)¶
Initialize the mixin.
- accept_policies(user)¶
Accept the linked policies for the given user.
- Parameters:
user (
django.contrib.auth.models.User
) – The user who has accepted the privacy policy and/or terms of service.
- __annotations__ = {}¶