.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, default_value, bool locked=False) | |
parse (self, str data) | |
get_value (self) | |
save (self, str name, flask.Response resp) | |
Public Attributes | |
value = default_value | |
locked = locked | |
Base class of user settings
Definition at line 44 of file preferences.py.
searx.preferences.Setting.__init__ | ( | self, | |
default_value, | |||
bool | locked = False ) |
Reimplemented in searx.preferences.EnumStringSetting, searx.preferences.MapSetting, searx.preferences.MultipleChoiceSetting, and searx.preferences.SetSetting.
Definition at line 47 of file preferences.py.
References searx.preferences.Setting.__init__().
Referenced by searx.preferences.Setting.__init__().
searx.preferences.Setting.get_value | ( | self | ) |
Returns the value of the setting If needed, its overwritten in the inheritance.
Reimplemented in searx.preferences.SetSetting.
Definition at line 59 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.Setting.parse | ( | self, | |
str | data ) |
Parse ``data`` and store the result at ``self.value`` If needed, its overwritten in the inheritance.
Reimplemented in searx.preferences.BooleanSetting, searx.preferences.EnumStringSetting, searx.preferences.MapSetting, searx.preferences.MultipleChoiceSetting, searx.preferences.SearchLanguageSetting, and searx.preferences.SetSetting.
Definition at line 52 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.Setting.save | ( | self, | |
str | name, | ||
flask.Response | resp ) |
Save cookie ``name`` in the HTTP response object If needed, its overwritten in the inheritance.
Reimplemented in searx.preferences.BooleanSetting, searx.preferences.MapSetting, searx.preferences.MultipleChoiceSetting, and searx.preferences.SetSetting.
Definition at line 66 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.Setting.locked = locked |
Definition at line 50 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.parse_form().
searx.preferences.Setting.value = default_value |
Definition at line 49 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().