Add comprehensive documentation for LeagueLedger

- Created architecture overview in development/architecture.md
- Added installation guide in getting-started/installation.md
- Developed user guide with detailed instructions in user-guide/overview.md, user-guide/teams.md, user-guide/qr-codes.md
- Implemented social login setup documentation in social_login_setup.md
- Updated index.md to include links to new documentation sections
- Configured mkdocs.yml for site structure and theme
- Added requirements.txt for documentation dependencies
This commit is contained in:
Christian Krakau-Louis
2025-04-15 12:32:03 +02:00
parent 7323c12168
commit 6306abf6d9
26 changed files with 3350 additions and 132 deletions
+11 -2
View File
@@ -10,7 +10,8 @@ from sqlalchemy.orm import Session
from passlib.context import CryptContext
from .models import User, Team, TeamMembership, QRCode, QRSet, TeamAchievement, Event
from .db import SessionLocal
from .db import SessionLocal, engine
from .db_migrations import run_migrations
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
@@ -25,6 +26,14 @@ def table_has_column(engine, table_name, column_name):
columns = [col['name'] for col in inspector.get_columns(table_name)]
return column_name in columns
def init_db():
"""Initialize the database, applying migrations and seeding data."""
# First, run any needed migrations
run_migrations(engine)
# Then proceed with seeding if needed
seed_db()
def seed_db():
"""Seed the database with test data."""
db = SessionLocal()
@@ -288,4 +297,4 @@ def seed_db():
db.close()
if __name__ == "__main__":
seed_db()
init_db()