Jump to >

djblets.extensions.forms

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]
siteconfig[source]

An alias for the instance, for backwards-compatibility.

set_key_value(key, value)[source]

Set the value for an extension settings key.

Parameters:
  • key (unicode) – The settings key.
  • value (object) – The settings value.
save_instance()[source]

Save the instance.