November 2015
Beginner
250 pages
5h 16m
English
One of the first obstacles faced by writing tests in a team or with a production environment is, How do we make sure that the tests are run without interfering with the production or even the development database. You certainly don't want to be attempting to fix bugs, or trialing new features and then finding that the data it relies upon has changed. Sometimes, a quick test just needs to be run on a local copy of the database without interference from anyone else, with the Flask app knowing how to use that.
One of the features built into Flask is the ability to load a configuration file depending on the environment variables.
app.config.from_envvar('FLASK_APP_BLOG_CONFIG_FILE')The preceding method call informs your Flask ...
Read now
Unlock full access