reviewboard.accounts.pages¶
- class AccountPageRegistry[source]¶
Bases:
ExceptionFreeGetterMixin
,ConfigPageRegistry
A registry for managing account pages.
- lookup_attrs: Sequence[str] = ('page_id',)[source]¶
A list of attributes that items can be looked up by.
- get_defaults()[source]¶
Return the default page classes.
- Returns:
The page classes, as subclasses of
AccountPage
.- Return type:
- unregister(page_class)[source]¶
Unregister the page class.
- Parameters:
page_class (
type
) – The page class to unregister.- Raises:
ItemLookupError – This exception is raised if the specified page class cannot be found.
- __annotations__ = {'_by_id': 'Dict[int, RegistryItemType]', '_items': 'set[RegistryItemType]', '_key_order': 'List[int]', '_lock': 'RLock', '_registry': 'dict[str, dict[object, RegistryItemType]]', 'already_registered_error_class': 'Type[AlreadyRegisteredError]', 'default_errors': 'RegistryErrorsDict', 'errors': 'RegistryErrorsDict', 'item_name': 'Optional[str]', 'lookup_attrs': 'Sequence[str]', 'lookup_error_class': 'Type[ItemLookupError]', 'state': 'RegistryState'}¶
- __parameters__ = ()¶
- class AccountPage(config_view, request, user)[source]¶
Bases:
DynamicConfigPageMixin
,ConfigPage
Base class for a page of forms in the My Account page.
Each AccountPage is represented in the My Account page by an entry in the navigation sidebar. When the user has navigated to that page, any forms shown on the page will be displayed.
Extensions can provide custom pages in order to offer per-user customization.
- classmethod get_absolute_url()[source]¶
Return the absolute URL of the page.
- Returns:
The absolute URL of the page.
- Return type:
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class AccountSettingsPage(config_view, request, user)[source]¶
Bases:
AccountPage
A page containing the primary settings the user can customize.
- page_id: Optional[str] = 'settings'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'Settings'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.AccountSettingsForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class AppearancePage(config_view, request, user)[source]¶
Bases:
AccountPage
A page giving users control over the appearance of Review Board.
New in version 7.0.
- page_id: Optional[str] = 'appearance'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'Appearance'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.ThemeForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class AuthenticationPage(config_view, request, user)[source]¶
Bases:
AccountPage
A page containing authentication-related forms.
By default, this just shows the Change Password form, but extensions can provide additional forms for display.
- page_id: Optional[str] = 'authentication'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'Authentication'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.ChangePasswordForm'>, <class 'reviewboard.accounts.forms.pages.APITokensForm'>, <class 'reviewboard.accounts.forms.pages.OAuthTokensForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class ProfilePage(config_view, request, user)[source]¶
Bases:
AccountPage
A page containing settings for the user’s profile.
- page_id: Optional[str] = 'profile'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'Profile'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.ProfileForm'>, <class 'reviewboard.accounts.forms.pages.AvatarSettingsForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class GroupsPage(config_view, request, user)[source]¶
Bases:
AccountPage
A page containing a filterable list of groups to join.
- page_id: Optional[str] = 'groups'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'Groups'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.GroupsForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class OAuth2Page(config_view, request, user)[source]¶
Bases:
AccountPage
A page containing a list of OAuth2 applications to manage.
- page_id: Optional[str] = 'oauth2'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'OAuth2 Applications'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.OAuthApplicationsForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶
- class PrivacyPage(config_view, request, user)[source]¶
Bases:
AccountPage
A page containing information on a user’s privacy rights.
- page_id: Optional[str] = 'privacy'[source]¶
The unique ID of the page.
This must be unique across all ConfigPages at a given URL.
- page_title: Optional[StrOrPromise] = 'My Privacy Rights'[source]¶
The displayed title for the page.
This will show up in the navigation sidebar.
- form_classes: Optional[List[Type[ConfigPageForm]]] = [<class 'reviewboard.accounts.forms.pages.PrivacyForm'>][source]¶
The list of form subclasses to display on the page.
- __annotations__ = {'form_classes': 'Optional[List[Type[ConfigPageForm]]]', 'page_id': 'Optional[str]', 'page_title': 'Optional[StrOrPromise]'}¶