This is a simple Python Flask web application for booking sabre lessons, styled using TailwindCSS and with a few additional packages to help make life easier for future upgrades, such as flask-migrate.
- Make a new directory and initialise venv:
python3 -m venv .venv source .venv/bin/activate which python
- Clone the repository using git clone.
- pip install -r requirements.txt
- Create a .env file in the project root with the key:pair APP_SECRET_KEY = "". You can generate your secret key by running the following command in the terminal: python -c 'import secrets; print(secrets.token_hex())'
- Initialise the db migration: flask db migrate
- Upgrade the database: flask db upgrade
- Install Tailwindcss
- Compile Tailwindcss file: npx tailwindcss -i ./app/static/src/style.css -o ./app/static/css/main.css
- Run program: python main.py
For the local version, the code will automatically make the first user you register into an admin. Then you can administer the database via flask-admin by browsing to the /admin/ route in your browser.