reviewboard.integrations.forms¶
Configuration forms for integrations.
- class IntegrationConfigForm(data=None, initial={}, request=None, *args, **kwargs)[source]¶
Bases:
LocalSiteAwareModelFormMixin
,IntegrationConfigForm
Base class for an integration settings form.
This makes it easy to provide a basic form for manipulating the settings of an integration configuration. It takes care of loading/saving the values and prompting the user for a name.
Integrations should subclass this and provide additional fields that they want to display to the user. They must provide a
Meta
class containing the fieldsets they want to display.- limit_to_local_site¶
The optional LocalSite to limit this configuration to. Any configuration-related fields or logic that might need to be bound to a LocalSite must make use of this.
- model_fields = ('name', 'enabled', 'local_site')[source]¶
A list of fields on the model that should not be saved in settings
- basic_info_fieldset = (None, {'fields': ('name', 'enabled', 'local_site'), 'description': 'Start by giving this configuration a name so you can easily identify it later. You can also mark this configuration as enabled or disabled.'})[source]¶
The fieldset containing basic information on the configuration.
This is the same as the djblets version, but with the local site field added in.
- __annotations__ = {'instance': 'Optional[BaseIntegrationConfig]', 'integration': 'Integration', 'request': 'HttpRequest'}¶
- declared_fields = {'enabled': <django.forms.fields.BooleanField object>, 'local_site': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>}¶