示例#1
0
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)
示例#2
0
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)
示例#3
0
 def load_per_request_state():
     site_state.get_states()
     feature_flag.get_db_flags()
示例#4
0
文件: main.py 项目: dominicgs/Website
 def load_per_request_state():
     site_state.get_states()
     feature_flag.get_db_flags()