.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, List[str] default_value, Iterable[str] choices, locked=False) | |
parse (self, str data) | |
parse_form (self, List[str] data) | |
save (self, str name, flask.Response resp) | |
Public Member Functions inherited from searx.preferences.Setting | |
get_value (self) | |
Public Attributes | |
choices = choices | |
list | value = data.split(',') |
locked | |
Public Attributes inherited from searx.preferences.Setting | |
value = default_value | |
locked = locked | |
Protected Member Functions | |
_validate_selections (self, List[str] selections) | |
Setting of values which can only come from the given choices
Definition at line 95 of file preferences.py.
searx.preferences.MultipleChoiceSetting.__init__ | ( | self, | |
List[str] | default_value, | ||
Iterable[str] | choices, | ||
locked = False ) |
Reimplemented from searx.preferences.Setting.
Definition at line 98 of file preferences.py.
References searx.preferences.MultipleChoiceSetting.__init__().
Referenced by searx.preferences.MultipleChoiceSetting.__init__().
|
protected |
Definition at line 103 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.MultipleChoiceSetting.parse().
searx.preferences.MultipleChoiceSetting.parse | ( | self, | |
str | data ) |
Parse and validate ``data`` and store the result at ``self.value``
Reimplemented from searx.preferences.Setting.
Definition at line 108 of file preferences.py.
References searx.preferences.MultipleChoiceSetting._validate_selections(), 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.MultipleChoiceSetting.parse_form | ( | self, | |
List[str] | data ) |
Definition at line 118 of file preferences.py.
searx.preferences.MultipleChoiceSetting.save | ( | self, | |
str | name, | ||
flask.Response | resp ) |
Save cookie ``name`` in the HTTP response object
Reimplemented from searx.preferences.Setting.
Definition at line 127 of file preferences.py.
References 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.MultipleChoiceSetting.choices = choices |
Definition at line 100 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.MultipleChoiceSetting.locked |
Definition at line 119 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.parse_form().
list searx.preferences.MultipleChoiceSetting.value = data.split(',') |
Definition at line 101 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().