Because of the unit tests in the test flask. So prepare to get an environment, check the official documents found flask Source There is a example folder inside there is a FLASKR application to test
Look at the Readme document, which is roughly the case
/FLASKR/ A minimal blog application ~ What is Flaskr? A SQLite powered thumble Blog Application ~ How does I use it? 1. Edit the configuration in the flaskr.py file or export an flaskr_settings environment variable pointing to a CO Nfiguration file. 2. Initialize the database with this command: flask--app=flaskr initdb 3. Now can run Flaskr: flask-- App=flaskr Run the application would greet you on http://localhost:5000/ ~ it tested? You betcha. Run the ' test_flaskr.py ' file to see the tests pass.
It's obviously some introduction, and then I'll show you how to use it.
Here you might try to do it directly
Flask--app=flaskr Initdb
However, there may be no OVA, and your CLI will tell you flask command not found. This pit I went to issue to search, and sure enough, some people have recently asked
Since this is the newest feature in flask the latest version 0.11.dev0 so the latest version of the direct use of PIP install flask is not able to run the environment variable is also not modified
So executing this command, there is no way to get the desired effect. Issue above someone gave a solution that basically installs the latest version directly from the code I tried it. It is possible to solve this problem by installing the latest code directly with PIP.
This sentence is directly using Pip install to pull the latest Master Master stable version above GitHub. Then try it again.
Finally with
Export
。。。 Again to be beaten face. Do not try to use Baidu to solve such problems. I can't find it in my life.
Look at the document to see English. Search the problem with Google. Amend.
Resolves an issue where the latest flask version downloaded from PIP cannot run Flaskr and latest features