Closed ivanccheng closed 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
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.
db
players.py
categories.py
matches.py
app
Read more about the difference between db = SQLAlchemy() vs db = SQLAlchemy(app) https://flask-sqlalchemy.palletsprojects.com/en/2.x/api/.
db = SQLAlchemy()
db = SQLAlchemy(app)
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 inplayers.py
,categories.py
, andmatches.py
changed to not import needapp
resource, will allow these files to be used for scripts.Read more about the difference between
db = SQLAlchemy()
vsdb = SQLAlchemy(app)
https://flask-sqlalchemy.palletsprojects.com/en/2.x/api/.