Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.04 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.04 KB

Flask-starter contains some boilerplate Flask and SQLAlchemy code to help you quickly set up a new Flask project.

Installation

Install Python 3.8.10 and the latest version of PostgreSQL git clone [email protected]:socrateasehq/Flask-Starter.git

Create and enter a virtual environment

cd Flask-starter
python3 -m venv virtualenv
source virtualenv/bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
pip install setuptools --upgrade
pip install -r requirements.txt

Create a database

createdb lms

How to run

python app.py

Migrating database

Once you modified the models codebase to mirror the change to the database without deleting it, use flask migrate, but before we do that we need to tell flask where entry script is located;

For Windows users do this

set FLASK_APP = app.py
flask db init
flask db migrate
flask db upgrade

Linux Users do this instead

export FLASK_APP = app.py
flask db init
flask db migrate
flask db upgrade