.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, default_value, Dict[str, object] map, locked=False) | |
parse (self, str data) | |
save (self, str name, flask.Response resp) | |
Public Member Functions inherited from searx.preferences.Setting | |
get_value (self) | |
Public Attributes | |
map = map | |
value = self.map[data] | |
key = data | |
Public Attributes inherited from searx.preferences.Setting | |
value = default_value | |
locked = locked | |
Setting of a value that has to be translated in order to be storable
Definition at line 189 of file preferences.py.
searx.preferences.MapSetting.__init__ | ( | self, | |
default_value, | |||
Dict[str, object] | map, | ||
locked = False ) |
Reimplemented from searx.preferences.Setting.
Definition at line 192 of file preferences.py.
References searx.preferences.MapSetting.__init__().
Referenced by searx.preferences.MapSetting.__init__().
searx.preferences.MapSetting.parse | ( | self, | |
str | data ) |
Parse and validate ``data`` and store the result at ``self.value``
Reimplemented from searx.preferences.Setting.
Definition at line 199 of file preferences.py.
References searx.format, and searx.preferences.MapSetting.map.
searx.preferences.MapSetting.save | ( | self, | |
str | name, | ||
flask.Response | resp ) |
Save cookie ``name`` in the HTTP response object
Reimplemented from searx.preferences.Setting.
Definition at line 207 of file preferences.py.
References searx.preferences.BooleanSetting.key, and searx.preferences.MapSetting.key.
searx.preferences.MapSetting.key = data |
Definition at line 205 of file preferences.py.
Referenced by searx.preferences.BooleanSetting.save(), and searx.preferences.MapSetting.save().
searx.preferences.MapSetting.map = map |
Definition at line 194 of file preferences.py.
Referenced by searx.preferences.MapSetting.parse().
searx.preferences.MapSetting.value = self.map[data] |
Definition at line 204 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().