File tree Expand file tree Collapse file tree 1 file changed +77
-0
lines changed Expand file tree Collapse file tree 1 file changed +77
-0
lines changed Original file line number Diff line number Diff line change
1
+ Flaskr
2
+ ======
3
+
4
+ The basic blog app built in the Flask `tutorial `_.
5
+
6
+ .. _tutorial : https://flask.palletsprojects.com/tutorial/
7
+
8
+
9
+ Install
10
+ -------
11
+
12
+ **Be sure to use the same version of the code as the version of the docs
13
+ you're reading. ** You probably want the latest tagged version, but the
14
+ default Git version is the master branch. ::
15
+
16
+ # clone the repository
17
+ $ git clone https://github.com/pallets/flask
18
+ $ cd flask
19
+ # checkout the correct version
20
+ $ git tag # shows the tagged versions
21
+ $ git checkout latest-tag-found-above
22
+ $ cd examples/tutorial
23
+
24
+ Create a virtualenv and activate it::
25
+
26
+ $ python3 -m venv venv
27
+ $ . venv/bin/activate
28
+
29
+ Or on Windows cmd::
30
+
31
+ $ py -3 -m venv venv
32
+ $ venv\Scripts\activate.bat
33
+
34
+ Install Flaskr::
35
+
36
+ $ pip install -e .
37
+
38
+ Or if you are using the master branch, install Flask from source before
39
+ installing Flaskr::
40
+
41
+ $ pip install -e ../..
42
+ $ pip install -e .
43
+
44
+
45
+ Run
46
+ ---
47
+
48
+ ::
49
+
50
+ $ export FLASK_APP=flaskr
51
+ $ export FLASK_ENV=development
52
+ $ flask init-db
53
+ $ flask run
54
+
55
+ Or on Windows cmd::
56
+
57
+ > set FLASK_APP=flaskr
58
+ > set FLASK_ENV=development
59
+ > flask init-db
60
+ > flask run
61
+
62
+ Open http://127.0.0.1:5000 in a browser.
63
+
64
+
65
+ Test
66
+ ----
67
+
68
+ ::
69
+
70
+ $ pip install '.[test]'
71
+ $ pytest
72
+
73
+ Run with coverage report::
74
+
75
+ $ coverage run -m pytest
76
+ $ coverage report
77
+ $ coverage html # open htmlcov/index.html in a browser
You can’t perform that action at this time.
0 commit comments