def feature_enabled(feature): """ If a feature flag is defined in the database return that, otherwise fall back to the config setting. """ db_flags = get_db_flags() if feature in db_flags: return db_flags[feature] return app.config.get(feature, False)
def load_per_request_state(): site_state.get_states() feature_flag.get_db_flags()