.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, str name, Dict[str, bool] choices, bool locked=False) | |
transform_form_items (self, items) | |
transform_values (self, values) | |
parse_cookie (self, str data_disabled, str data_enabled) | |
parse_form (self, List[str] items) | |
enabled (self) | |
disabled (self) | |
save (self, flask.Response resp) | |
get_disabled (self) | |
get_enabled (self) | |
Public Attributes | |
name = name | |
choices = choices | |
locked = locked | |
default_choices = dict(choices) | |
bool | choices = False |
disabled | |
enabled | |
Maps strings to booleans that are either true or false.
Definition at line 233 of file preferences.py.
searx.preferences.BooleanChoices.__init__ | ( | self, | |
str | name, | ||
Dict[str, bool] | choices, | ||
bool | locked = False ) |
Reimplemented in searx.preferences.EnginesSetting, and searx.preferences.PluginsSetting.
Definition at line 236 of file preferences.py.
searx.preferences.BooleanChoices.disabled | ( | self | ) |
Definition at line 270 of file preferences.py.
References searx.preferences.BooleanChoices.choices, searx.preferences.EnumStringSetting.choices, searx.preferences.MultipleChoiceSetting.choices, and searx.preferences.SearchLanguageSetting.choices.
Referenced by searx.preferences.BooleanChoices.save().
searx.preferences.BooleanChoices.enabled | ( | self | ) |
Definition at line 266 of file preferences.py.
References searx.preferences.BooleanChoices.choices, searx.preferences.EnumStringSetting.choices, searx.preferences.MultipleChoiceSetting.choices, and searx.preferences.SearchLanguageSetting.choices.
Referenced by searx.preferences.BooleanChoices.save().
searx.preferences.BooleanChoices.get_disabled | ( | self | ) |
Definition at line 280 of file preferences.py.
searx.preferences.BooleanChoices.get_enabled | ( | self | ) |
Definition at line 283 of file preferences.py.
searx.preferences.BooleanChoices.parse_cookie | ( | self, | |
str | data_disabled, | ||
str | data_enabled ) |
Definition at line 248 of file preferences.py.
searx.preferences.BooleanChoices.parse_form | ( | self, | |
List[str] | items ) |
Definition at line 257 of file preferences.py.
References searx.preferences.BooleanChoices.choices, searx.preferences.EnumStringSetting.choices, searx.preferences.MultipleChoiceSetting.choices, searx.preferences.SearchLanguageSetting.choices, searx.preferences.BooleanChoices.locked, searx.preferences.MultipleChoiceSetting.locked, searx.preferences.SetSetting.locked, searx.preferences.Setting.locked, searx.preferences.BooleanChoices.transform_form_items(), searx.preferences.EnginesSetting.transform_form_items(), and searx.preferences.PluginsSetting.transform_form_items().
searx.preferences.BooleanChoices.save | ( | self, | |
flask.Response | resp ) |
Save cookie in the HTTP response object
Definition at line 273 of file preferences.py.
References searx.preferences.BooleanChoices.default_choices, searx.preferences.BooleanChoices.disabled(), searx.preferences.BooleanChoices.disabled, searx.preferences.BooleanChoices.enabled(), searx.preferences.BooleanChoices.enabled, searx.format, searx.engines.wikidata.WDAmountAttribute.name, searx.engines.wikidata.WDAttribute.name, searx.engines.wikidata.WDDateAttribute.name, searx.engines.wikidata.WDGeoAttribute.name, searx.engines.wikidata.WDLabelAttribute.name, searx.preferences.BooleanChoices.name, and searx.search.models.EngineRef.name.
searx.preferences.BooleanChoices.transform_form_items | ( | self, | |
items ) |
Reimplemented in searx.preferences.EnginesSetting, and searx.preferences.PluginsSetting.
Definition at line 242 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.parse_form().
searx.preferences.BooleanChoices.transform_values | ( | self, | |
values ) |
Reimplemented in searx.preferences.EnginesSetting.
Definition at line 245 of file preferences.py.
bool searx.preferences.BooleanChoices.choices = choices |
Definition at line 238 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().
bool searx.preferences.BooleanChoices.choices = False |
Definition at line 250 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.BooleanChoices.default_choices = dict(choices) |
Definition at line 240 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.save().
searx.preferences.BooleanChoices.disabled |
Definition at line 281 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.save().
searx.preferences.BooleanChoices.enabled |
Definition at line 284 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.save().
searx.preferences.BooleanChoices.locked = locked |
Definition at line 239 of file preferences.py.
Referenced by searx.preferences.BooleanChoices.parse_form().
searx.preferences.BooleanChoices.name = name |
Definition at line 237 of file preferences.py.
Referenced by searx.search.models.EngineRef.__eq__(), searx.search.models.EngineRef.__hash__(), searx.engines.wikidata.WDAttribute.__repr__(), searx.search.models.EngineRef.__repr__(), searx.engines.wikidata.WDGeoAttribute.get_geo_url(), searx.engines.wikidata.WDAttribute.get_label(), searx.engines.wikidata.WDAttribute.get_select(), searx.engines.wikidata.WDAmountAttribute.get_str(), searx.engines.wikidata.WDAttribute.get_str(), searx.engines.wikidata.WDDateAttribute.get_str(), searx.engines.wikidata.WDGeoAttribute.get_str(), searx.engines.wikidata.WDLabelAttribute.get_str(), searx.engines.wikidata.WDURLAttribute.get_str(), searx.engines.wikidata.WDAmountAttribute.get_where(), searx.engines.wikidata.WDAttribute.get_where(), searx.engines.wikidata.WDDateAttribute.get_where(), searx.engines.wikidata.WDGeoAttribute.get_where(), searx.engines.wikidata.WDLabelAttribute.get_where(), searx.engines.wikidata.WDLabelAttribute.get_wikibase_label(), and searx.preferences.BooleanChoices.save().