Skip to content
Myr

README.rst

This file

Path

examples/tutorial/README.rst

68 lines · 1.2 KiB

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 21aaf0e point at it.

Merge branch '2.2.x'David Lordbefore adoption21aaf0e

lines 1–25why, one step back
1Flaskr
2======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 the14default Git version is the main branch. ::1516 # 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::25

Merge pull request #4947 from pallets/pyprojectDavid Lordbefore adoption78b42b9

lines 26–27why, one step back
26 $ python3 -m venv .venv
27 $ . .venv/bin/activate

Merge branch '2.2.x'David Lordbefore adoption21aaf0e

lines 28–30why, one step back
28
29Or on Windows cmd::30

Merge pull request #4947 from pallets/pyprojectDavid Lordbefore adoption78b42b9

lines 31–32why, one step back
31 $ py -3 -m venv .venv
32 $ .venv\Scripts\activate.bat

Merge branch '2.2.x'David Lordbefore adoption21aaf0e

lines 33–50why, one step back
33
34Install Flaskr::3536 $ pip install -e .3738Or if you are using the main branch, install Flask from source before39installing Flaskr::4041 $ pip install -e ../..42 $ pip install -e .434445Run46---4748.. code-block:: text4950 $ flask --app flaskr init-db

new run debug docsDavid Lordbefore adoption74e5263

line 51why, one step back
51 $ flask --app flaskr run --debug

Merge branch '2.2.x'David Lordbefore adoption21aaf0e

lines 52–68why, one step back
52
53Open http://127.0.0.1:5000 in a browser.545556Test57----5859::6061 $ pip install '.[test]'62 $ pytest6364Run with coverage report::6566 $ coverage run -m pytest67 $ coverage report68 $ coverage html # open htmlcov/index.html in a browser