- create virtual environment'
- activate virtual environment
- go to root directory - flask_todo.
- run
pip install -m requirements.txt
to install packages from that txt file.
- install sqlite or sqlite viewer extension in vscode to see the db tables
- delete and re create db if you want.
2.1. run python command in terminal inside root directory - (flask_todo) not the project directory (flask_todo) and enter below lines
from flask_todo import app, db app.app_context().push() #this will create emtpy instance folder in root db.create_all() #this will add site.db file inside instance folder if you want to delete all the tables from db, enter below command. db.drop_all()
inside root directory, run
python run.py
to start the server
- flask_todo > - root directory
- flask_todo > - project directory
- templates >
- base.html
- home.html
- todos.html
- create.html
- update.html
- init.py
- forms.py
- models.py
- routes.py
- templates >
- instance >
- site.db
- run.py
- flask_todo > - project directory