def get_setting_value_by_id(id):
    """Get value for a setting"""

    setting_schema = SettingMASchema()

    return jsonify(
        setting_schema.dump(Setting.query.filter_by(pk=id).first()).data)
def get_settings_by_category_id(cat_id):
    """Get value for a setting"""

    setting_schema = SettingMASchema()

    return jsonify(
        setting_schema.dump(Setting.query.filter_by(category_id=cat_id).all(),
                            many=True).data)
def get_all_settings():
    """Get all settings"""

    setting_schema = SettingMASchema()

    return jsonify(setting_schema.dump(v).data for v in Setting.query.all())