flask_waffleconf.models¶
-
class
flask_waffleconf.models.WaffleMixin¶ Bases:
objectMixin used in the creation of the database model.
WaffleConf expects a model that has (at least) the following fields:
- key (str): Unique identifier for configuration variable.
- value (str): Value for the configuration variable.
Values may be a large string, so make sure to define a field capable of storing big strings. These values are later parsed according to the
typespecified in the application configuration.-
get_key()¶ Obtain the key for the configuration variable.
Mixin expects a
self.keyattribute (str) in the model. If this is not the case, you should override this method.Returns: Configuration key string.
-
get_value()¶ Obtain the value for the configuration variable.
Mixin expects a
self.valueattribute (str) in the model. If this is not the case, you should override this method.Returns: Configuration value string.