Sample code from my "Introduction to Flask" presentation. The slides for this presentation are available at https://speakerdeck.com/miguelgrinberg/introduction-to-flask.
- Flask (
pip install flask
) is required for all the examples. - Flask-Bootstrap (
pip install flask-bootstrap
) is required for examples 4 and up. - Flask-WTF (
pip install flask-wtf
) is required for examples 5 and up.
You can create a virtual environment and install the required packages with the following commands:
$ virtualenv venv
$ . venv/bin/activate
(venv) $ pip install -r requirements.txt
With the virtual environment activated you can cd
into any of the examples and run the main script.
For examples 1-6:
(venv) $ python hello.py
For example 7:
(venv) $ python manage.py