Files
Sternsinger/CMBNet/README_CMBNet.md
T
2026-10-23 00:05:06 +02:00

945 B

CMBNet

Webanwendung für die Verwaltung von Straßen und Gruppen mit Kartendarstellung.

Setup

cd CMBNet
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
mkdir -p instance logs data migrations
flask --app cmbnet init-db
flask --app cmbnet run --debug --host 127.0.0.1 --port 5000

Zugriff

Öffne http://127.0.0.1:5000 und wähle einen Mandanten (BV, RV, SV).

Erste Einrichtung

Nach der Initialisierung der Datenbank müssen noch Mandanten und ein Admin-Account angelegt werden.

sqlite3 instance/cmbnet.sqlite3
INSERT INTO tenants (code, name) VALUES ('BV', 'Bezirk BV'), ('RV', 'Bezirk RV'), ('SV', 'Bezirk SV');
INSERT INTO accounts (tenant_id, name, password_hash, role) VALUES (2, 'admin', '...', 'Administrator');

Für den Passwort-Hash kann python3 -c "from werkzeug.security import generate_password_hash; print(generate_password_hash('admin'))" verwendet werden.