reviewboard.admin.form_widgets¶
Admin-specific form widgets.
-
class
RelatedObjectWidget
(local_site_name=None, multivalued=True)[source]¶ Bases:
djblets.forms.widgets.RelatedObjectWidget
A base class form widget that lets people select one or more objects.
This is a base class. Extended classes must define their own render() method, to render their own widget with their own data.
This should be used with relatedObjectSelectorView.es6.js, which extends a Backbone view to display data.
-
class
RelatedUserWidget
(local_site_name=None, multivalued=True)[source]¶ Bases:
reviewboard.admin.form_widgets.RelatedObjectWidget
A form widget to allow people to select one or more User relations.
It’s not unheard of to have a server with thousands or tens of thousands of registered users. In this case, the existing Django admin widgets fall down hard. The filtered select widgets can actually crash the webserver due to trying to pre-populate an enormous
<select>
element, and the raw ID widget is basically a write-only field.This field does much better, offering both the ability to see who’s already in the list, as well as interactive search and filtering.
-
render
(name, value, attrs=None)[source]¶ Render the widget.
Parameters: Returns: The rendered HTML.
Return type:
-
-
class
RelatedRepositoryWidget
(local_site_name=None, multivalued=True)[source]¶ Bases:
reviewboard.admin.form_widgets.RelatedObjectWidget
A form widget allowing people to select one or more Repository objects.
This widget offers both the ability to see which repositories are already in the list, as well as interactive search and filtering.
-
render
(name, value, attrs=None)[source]¶ Render the widget.
Parameters: Returns: The rendered HTML.
Return type:
-
value_from_datadict
(data, files, name)[source]¶ Unpack the field’s value from a datadict.
Parameters: Returns: The list of IDs of
Repository
objects.Return type:
-
-
class
RelatedGroupWidget
(invite_only=False, *args, **kwargs)[source]¶ Bases:
reviewboard.admin.form_widgets.RelatedObjectWidget
A form widget allowing people to select one or more Group objects.
This widget offers both the ability to see which groups are already in the list, as well as interactive search and filtering.
-
__init__
(invite_only=False, *args, **kwargs)[source]¶ Initialize the RelatedGroupWidget.
Parameters:
-
render
(name, value, attrs=None)[source]¶ Render the widget.
Parameters: Returns: The rendered HTML.
Return type:
-