uwbaddev / baddie-match

Web app to track our badminton matches
2 stars 2 forks source link

Fix project structure #34

Closed ivanccheng closed 2 years ago

ivanccheng commented 2 years ago

Changed project structure to be more intuitive, and will allow for scripts to actually work (to come)

FYI: old problem was importing anything from /app would run init.py, which would try to fire up the application causing issues

Application entry point moved to app/main.py, instead of in init.py

Application will need to be started with FLASK_APP=app.main flask run

db resource in players.py, categories.py, and matches.py changed to not import need app resource, will allow these files to be used for scripts.

Read more about the difference between db = SQLAlchemy() vs db = SQLAlchemy(app) https://flask-sqlalchemy.palletsprojects.com/en/2.x/api/.