librelist archives

« back to archive

get_config utility function

get_config utility function

From:
Dan Jacob
Date:
2010-06-22 @ 10:24
current_app.config is a bit long-winded. Just wondering if a simple
convenient get_config couldn't be added to Flask API:

def get_config(name, default=None):
    return current_app.config.get(name, default)