.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, str default_value, Iterable[str] choices, locked=False) | |
parse (self, str data) | |
Public Member Functions inherited from searx.preferences.Setting | |
get_value (self) | |
save (self, str name, flask.Response resp) | |
Public Attributes | |
choices = choices | |
value | |
Public Attributes inherited from searx.preferences.Setting | |
value = default_value | |
locked = locked | |
Protected Member Functions | |
_validate_selection (self, str selection) | |
Setting of a value which can only come from the given choices
Definition at line 77 of file preferences.py.
searx.preferences.EnumStringSetting.__init__ | ( | self, | |
str | default_value, | ||
Iterable[str] | choices, | ||
locked = False ) |
Reimplemented from searx.preferences.Setting.
Definition at line 80 of file preferences.py.
References searx.preferences.EnumStringSetting.__init__().
Referenced by searx.preferences.EnumStringSetting.__init__().
|
protected |
Reimplemented in searx.preferences.SearchLanguageSetting.
Definition at line 85 of file preferences.py.
References searx.preferences.BooleanChoices.choices, searx.preferences.EnumStringSetting.choices, searx.preferences.MultipleChoiceSetting.choices, searx.preferences.SearchLanguageSetting.choices, and searx.format.
Referenced by searx.preferences.EnumStringSetting.parse().
searx.preferences.EnumStringSetting.parse | ( | self, | |
str | data ) |
Parse and validate ``data`` and store the result at ``self.value``
Reimplemented from searx.preferences.Setting.
Reimplemented in searx.preferences.SearchLanguageSetting.
Definition at line 89 of file preferences.py.
References searx.preferences.EnumStringSetting._validate_selection(), searx.preferences.SearchLanguageSetting._validate_selection(), searx.preferences.BooleanSetting.value, searx.preferences.EnumStringSetting.value, searx.preferences.MapSetting.value, searx.preferences.MultipleChoiceSetting.value, searx.preferences.SearchLanguageSetting.value, and searx.preferences.Setting.value.
searx.preferences.EnumStringSetting.choices = choices |
Definition at line 82 of file preferences.py.
Referenced by searx.preferences.EnumStringSetting._validate_selection(), searx.preferences.MultipleChoiceSetting._validate_selections(), searx.preferences.BooleanChoices.disabled(), searx.preferences.BooleanChoices.enabled(), searx.preferences.SearchLanguageSetting.parse(), and searx.preferences.BooleanChoices.parse_form().
searx.preferences.EnumStringSetting.value |
Definition at line 83 of file preferences.py.
Referenced by searx.preferences.Setting.get_value(), searx.preferences.EnumStringSetting.parse(), searx.preferences.MultipleChoiceSetting.parse(), searx.preferences.SearchLanguageSetting.parse(), searx.preferences.Setting.parse(), searx.preferences.MultipleChoiceSetting.save(), and searx.preferences.Setting.save().