README.rst
This file
Path
examples/tutorial/README.rst
77 lines · 1.4 KiB
Last changed by
Merge pull request #4010 from pallets/default-branchDavid Lordbefore adoption15b2241
History of this fileTake it
The walk stopped after 200 commits: lines older than 024f0d3 point at it.
move package metadata to setup.cfgDavid Lordbefore adoption024f0d3
lines 1–13why, one step back1Flaskr2======34The basic blog app built in the Flask `tutorial`_.56.. _tutorial: https://flask.palletsprojects.com/tutorial/789Install10-------1112**Be sure to use the same version of the code as the version of the docs13you're reading.** You probably want the latest tagged version, but theMerge pull request #4010 from pallets/default-branchDavid Lordbefore adoption15b2241
line 14why, one step back14default Git version is the main branch. ::move package metadata to setup.cfgDavid Lordbefore adoption024f0d3
lines 15–37why, one step back1516 # clone the repository17 $ git clone https://github.com/pallets/flask18 $ cd flask19 # checkout the correct version20 $ git tag # shows the tagged versions21 $ git checkout latest-tag-found-above22 $ cd examples/tutorial2324Create a virtualenv and activate it::2526 $ python3 -m venv venv27 $ . venv/bin/activate2829Or on Windows cmd::3031 $ py -3 -m venv venv32 $ venv\Scripts\activate.bat3334Install Flaskr::3536 $ pip install -e .37Merge pull request #4010 from pallets/default-branchDavid Lordbefore adoption15b2241
line 38why, one step back38Or if you are using the main branch, install Flask from source beforemove package metadata to setup.cfgDavid Lordbefore adoption024f0d3
lines 39–77why, one step back39installing Flaskr::4041 $ pip install -e ../..42 $ pip install -e .434445Run46---4748::4950 $ export FLASK_APP=flaskr51 $ export FLASK_ENV=development52 $ flask init-db53 $ flask run5455Or on Windows cmd::5657 > set FLASK_APP=flaskr58 > set FLASK_ENV=development59 > flask init-db60 > flask run6162Open http://127.0.0.1:5000 in a browser.636465Test66----6768::6970 $ pip install '.[test]'71 $ pytest7273Run with coverage report::7475 $ coverage run -m pytest76 $ coverage report77 $ coverage html # open htmlcov/index.html in a browser