webapp
This application is built using Flask-AppBuilder version 5.
Files
- app.py -- Initialize the Flask application, database session, and appbuilder object.
- config.py -- Configure application settings such as the database URI, secret key, etc.
- models.py -- SQLAlchemy model classes (database tables) generated by
sqlacodegen. - views.py -- Flask-AppBuilder views that provide CRUD web interfaces for the models.
Setup
Generate a random SECRET_KEY for use in config.py:
python -c 'import secrets; print(secrets.token_hex())'
Create an admin user before running for the first time:
flask fab create-admin
Running
Start a local dev server with debugging and reloading:
flask run --debug