Demo app done in Flask for the "Coding For Product: Intro to Frameworks & Database" lecture.
Requirements: Anaconda Python 3, Postgres, pip
-
clone repo
-
activate a virtual environment
conda python
$ conda create --name cfp_flask flask
# Mac
$ source activate cfp_flask
# Windows
$ activate cfp_demo_flask
- install packages
(cfp_flask) $ pip install -r requirements
- create database
(cfp_flask) $ createdb <database_name>
- set up enviroment variables
- copy .env.sample, and rename it .env
- fill in the
DATABASE_URI
- run migrations
(cfp_flask) $ python manage.py db upgrade
- run seed data to populate database
(cfp_flask) $ python manage.py seed
(cfp_flask) $ python3 app.py