How to use app.config.from_envvar()?
I have look at Flask doc and search for this topic what I all knows is to do this.
DATABASE = 'flaskr.db'
DEBUG = True
SECRET_KEY = 'development key'
app = Flask(__name__)
app.config.from_envvar(’FLASKR_SETTINGS’, silent=True)
Will this load the config from FLASKR_SETTINGS ? and how can the program knows what is FLASKR_SETTINGS? should I also set something like this (the path to the config file)?:
FLASKR_SETTINGS = desktop/my_flask_project/FlaskConfig
and move the first 3 lines into that file and when I run this file, it will be loaded in?
and I only choose to use of of these right? between the app.config.from_envvar (this one for load config from external file)or the app.config.from_object(name)(this one will load config within the file) ? Am i understand correctly?