Jump to >

reviewboard.accounts.pages

class AccountPageRegistry[source]

Bases: djblets.registries.mixins.ExceptionFreeGetterMixin, djblets.configforms.registry.ConfigPageRegistry

A registry for managing account pages.

lookup_attrs = (u'page_id',)[source]
get_defaults()[source]

Return the default page classes.

Returns:The page classes, as subclasses of AccountPage.
Return type: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.
class AccountPage(config_view, request, user)[source]

Bases: djblets.configforms.mixins.DynamicConfigPageMixin, djblets.configforms.pages.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.

registry = <reviewboard.accounts.pages.AccountPageRegistry object>[source]
classmethod get_absolute_url()[source]

Return the absolute URL of the page.

Returns:The absolute URL of the page.
Return type:unicode
class AccountSettingsPage(config_view, request, user)[source]

Bases: reviewboard.accounts.pages.AccountPage

A page containing the primary settings the user can customize.

page_id = u'settings'[source]
page_title = _(u'Settings')[source]
form_classes = [<class 'reviewboard.accounts.forms.pages.AccountSettingsForm'>][source]
class AuthenticationPage(config_view, request, user)[source]

Bases: reviewboard.accounts.pages.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 = u'authentication'[source]
page_title = _(u'Authentication')[source]
form_classes = [<class 'reviewboard.accounts.forms.pages.ChangePasswordForm'>, <class 'reviewboard.accounts.forms.pages.APITokensForm'>, <class 'reviewboard.accounts.forms.pages.OAuthTokensForm'>][source]
class ProfilePage(config_view, request, user)[source]

Bases: reviewboard.accounts.pages.AccountPage

A page containing settings for the user’s profile.

page_id = u'profile'[source]
page_title = _(u'Profile')[source]
form_classes = [<class 'reviewboard.accounts.forms.pages.ProfileForm'>, <class 'reviewboard.accounts.forms.pages.AvatarSettingsForm'>][source]
class GroupsPage(config_view, request, user)[source]

Bases: reviewboard.accounts.pages.AccountPage

A page containing a filterable list of groups to join.

page_id = u'groups'[source]
page_title = _(u'Groups')[source]
form_classes = [<class 'reviewboard.accounts.forms.pages.GroupsForm'>][source]
class OAuth2Page(config_view, request, user)[source]

Bases: reviewboard.accounts.pages.AccountPage

A page containing a list of OAuth2 applications to manage.

page_id = u'oauth2'[source]
page_title = u'OAuth2 Applications'[source]
form_classes = [<class 'reviewboard.accounts.forms.pages.OAuthApplicationsForm'>][source]
class PrivacyPage(config_view, request, user)[source]

Bases: reviewboard.accounts.pages.AccountPage

A page containing information on a user’s privacy rights.

page_id = u'privacy'[source]
page_title = _(u'My Privacy Rights')[source]
form_classes = [<class 'reviewboard.accounts.forms.pages.PrivacyForm'>][source]
register_account_page_class(cls)[source]

Register a custom account page class.

A page ID is considered unique and can only be registered once.

Parameters:

cls (type) – The page class to register, as a subclass of AccountPage.

Raises:
unregister_account_page_class(page_cls)[source]

Unregister a previously registered account page class.

Parameters:page_cls (type) – The page class to unregister, as a subclass of AccountPage.
get_page_class(page_id)[source]

Return the account page class with the specified ID.

Parameters:page_id (unicode) – The page’s unique identifier.
Returns:The AccountPage subclass, or None if it could not be found.
Return type:type
get_page_classes()[source]

Yield all registered page classes.

Yields:type – Each registered page class, as a subclass of AccountPage.