Jump to >


Form definitions for extensions.

class SettingsForm(extension, *args, **kwargs)[source]

Bases: djblets.forms.forms.key_value_form.KeyValueForm

Settings form for extension configuration.

A base form for loading/saving settings for an extension. This is meant to be overridden by extensions to provide configuration pages. Any fields defined by the form will be loaded and saved automatically.

__init__(extension, *args, **kwargs)[source]

Initialize the form.

  • data (dict, optional) – Data for the form.

  • files (dict, optional) – File uploads for the form.

  • instance (object, optional) – The existing instance being loaded from, if any.

  • *args (tuple) – Positional arguments for the form.

  • **kwargs (dict) – Keyword arguments for the form.

set_key_value(key, value)[source]

Set the value for an extension settings key.

  • key (unicode) – The settings key.

  • value (object) – The settings value.


Save the instance.

__annotations__ = {}
declared_fields = {}