https://github.com/blep/flaskr
Flaskr, from the official tutorial of Flask documentation.
https://github.com/blep/flaskr
flask-application flaskr tutorial-code
Last synced: 2 months ago
JSON representation
Flaskr, from the official tutorial of Flask documentation.
- Host: GitHub
- URL: https://github.com/blep/flaskr
- Owner: blep
- License: mit
- Created: 2017-11-14T08:40:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-05-13T16:59:02.000Z (11 months ago)
- Last Synced: 2025-05-13T17:59:21.166Z (11 months ago)
- Topics: flask-application, flaskr, tutorial-code
- Language: Python
- Size: 8.79 KB
- Stars: 6
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Official Tutorial
Flaskr, from the official tutorial of Flask documentation.
Unlike the example found in Flask sources, it does not
make use of Blueprint that are not introduced in the tutorial).
http://flask.pocoo.org/docs/0.12/tutorial/folders/#tutorial-folders
Like the tutorial, user name is `admin` and password is `default`.
# Running the server
## Development mode
### The flask tutorial way (not IDE friendly)
Creates and activate your virtual environment, then:
```text
env\Scripts\activate.bat
pip install --editable .
set FLASK_APP=flaskr
set FLASK_DEBUG=true
flask initdb
flask run
```
### IDE friendly way
Runs the `manage.py` script from your IDE as if it was the flask command above.
This script invokes the flask command after setting the environment variable.
So, for example in PyCharm, set:
- `Script` to the full path of `manage.py`
- `Script parameters` to `run` (or `initdb` to initialize the database)
## Production mode
See http://flask.pocoo.org/docs/0.12/deploying/#deployment