l.a.b.l.WidgetBase : class documentation

Part of lp.app.browser.lazrjs View In Hierarchy

Known subclasses: lp.app.browser.lazrjs.BooleanChoiceWidget, lp.app.browser.lazrjs.EnumChoiceWidget, lp.app.browser.lazrjs.InlineEditPickerWidget, lp.app.browser.lazrjs.InlineMultiCheckboxWidget, lp.app.browser.lazrjs.TextWidgetBase

Useful methods for all widgets.
Method __init__ Undocumented
Method resource_uri A local path to the context object.
Method json_resource_uri Undocumented
Method can_write Can the current user write to the attribute.
def __init__(self, context, exported_field, content_box_id, edit_view, edit_url, edit_title):
Undocumented
@property
def resource_uri(self):
A local path to the context object.

The javascript uses the normalize_uri method that adds the appropriate prefix to the uri. Doing it this way avoids needing to adapt the current request into a webservice request in order to get an api url.

@property
def json_resource_uri(self):
Undocumented
@property
def can_write(self):
Can the current user write to the attribute.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.