feat: add events app + "multi-tenants" aka multi-events

This commit is contained in:
2026-09-16 00:03:26 +02:00
parent b5c2cdc037
commit 8b9c254fd2
62 changed files with 1343 additions and 362 deletions
@@ -0,0 +1,24 @@
from django.db import migrations
EVENT_NAME = "PolyLAN 43"
EVENT_PATH = "polylan-43"
def seed_event(apps, schema_editor):
Event = apps.get_model("events", "Event")
Event.objects.get_or_create(path=EVENT_PATH, defaults={"name": EVENT_NAME})
def unseed_event(apps, schema_editor):
Event = apps.get_model("events", "Event")
Event.objects.filter(path=EVENT_PATH).delete()
class Migration(migrations.Migration):
dependencies = [
("events", "0001_initial"),
]
operations = [
migrations.RunPython(seed_event, unseed_event),
]