l.b.b.b.AdvancedSubscriptionMixin : class documentation

Part of lp.bugs.browser.bugsubscription View In Hierarchy

Known subclasses: lp.bugs.browser.bugsubscription.BugSubscriptionSubscribeSelfView, lp.bugs.browser.bugsubscriptionfilter.BugSubscriptionFilterEditViewBase

A mixin of advanced subscription code for views.

In order to use this mixin in a view the view must:
  • Define a current_user_subscription property which returns the current BugSubscription or StructuralSubscription for request.user. If there's no subscription for the given user in the given context, current_user_subscription must return None.
  • Define a dict, _bug_notification_level_descriptions, which maps BugNotificationLevel values to string descriptions for the current context (see BugSubscriptionSubscribeSelfView for an example).
  • Update the view's setUpFields() to call _setUpBugNotificationLevelField().
Method _bug_notification_level_field Return a custom form field for bug_notification_level.
Method _setUpBugNotificationLevelField Set up the bug_notification_level field.
@cachedproperty
def _bug_notification_level_field(self):
Return a custom form field for bug_notification_level.
def _setUpBugNotificationLevelField(self):
Set up the bug_notification_level field.
API Documentation for Launchpad, generated by pydoctor at 2019-09-19 00:00:07.