A basic activity management system developed for the Civil Protection ("Protezione Civile" in Italy) volunteers of my municipality. Based on Flask.
git clone https://github.com/aquaino/pgv-buttrio.git
Create a virtual environment with:
python -m venv .venv
Install project dependencies with:
pip install -r requirements.txt
This app is configured to work with PostgreSQL.
Create a database with:
CREATE DATABASE [database];
CREATE USER [user] WITH ENCRYPTED PASSWORD '[password]';
GRANT ALL PRIVILEGES ON DATABASE [database] TO [user];
Duplicate the .env.example
file in a new .env
file. Overwrite the settings with something like this, using the newly created database credentials.
SECRET_KEY = "[key]"
APP_SETTINGS = "app.config.DevelopmentConfig"
SQLALCHEMY_DATABASE_URI = "postgresql://[user]:[password]@localhost/[database]"
Initialize the database using:
flask recreate-db
Fill it with some example data, including an admin user to login with:
flask setup-db
Finally, run the application using:
flask run
And login to the system (at http://localhost:5000) with:
- admin@admin.it
- admin