Skip to content
Myr

README.rst

This file

Path

examples/tutorial/README.rst

77 lines · 1.3 KiB

Last changed by

Merge pull request #2826 from senarclens/masterAnthony Plunkettbefore adoption673e5af

History of this file

Take it

Merge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2

lines 1–51why, one step back
1Flaskr
2======34The basic blog app built in the Flask `tutorial`_.56.. _tutorial: http://flask.pocoo.org/docs/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 master 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::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 .3738Or if you are using the master branch, install Flask from source before39installing Flaskr::4041 pip install -e ../..42 pip install -e .434445Run46---4748::4950 export FLASK_APP=flaskr51 export FLASK_ENV=development

Merge pull request #2826 from senarclens/masterAnthony Plunkettbefore adoption673e5af

line 52why, one step back
52 flask init-db

Merge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2

lines 53–58why, one step back
53 flask run
5455Or on Windows cmd::5657 set FLASK_APP=flaskr58 set FLASK_ENV=development

Merge pull request #2826 from senarclens/masterAnthony Plunkettbefore adoption673e5af

line 59why, one step back
59 flask init-db

Merge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2

lines 60–69why, one step back
60 flask run
6162Open http://127.0.0.1:5000 in a browser.636465Test66----6768::69

Merge pull request #2699 from pallets/javascriptDavid Lordbefore adoption746b91d

line 70why, one step back
70 pip install '.[test]'

Merge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2

lines 71–77why, one step back
71 pytest
7273Run with coverage report::7475 coverage run -m pytest76 coverage report77 coverage html # open htmlcov/index.html in a browser