Jump to >

reviewboard.notifications.forms

Notification-related forms.

class WebHookTargetForm(data=None, initial={}, request=None, *args, **kwargs)[source]

Bases: reviewboard.site.mixins.LocalSiteAwareModelFormMixin, django.forms.models.ModelForm

A form for creating and updating WebHookTargets.

clean_extra_data()[source]

Ensure that extra_data is a valid value.

Returns

Either a non-zero length string of JSON-encoded extra data or None.

Return type

unicode

clean_events()[source]
clean()[source]

Validate the state of the entire form.

Returns

The cleaned form data.

class Meta[source]

Bases: object

model[source]

alias of reviewboard.notifications.models.WebHookTarget

widgets = {'apply_to': <django.forms.widgets.RadioSelect object>}[source]
error_messages = {'repositories': {'invalid_choice': 'A repository with ID %(value)s was not found.', 'invalid_pk_value': '"%(pk)s" is an invalid repository ID.'}}[source]
fields = '__all__'[source]
__annotations__ = {}
declared_fields = {'repositories': <django.forms.models.ModelMultipleChoiceField object>, 'url': <django.forms.fields.CharField object>}