Skip to content

A project with Flask boilerplate code, with SQLAlchemy Models

Notifications You must be signed in to change notification settings

socrateasehq/Flask-Starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A project with Flask boilerplate code, with SQLAlchemy Models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published