Initial public commit

Daybook: a self-hosted, multi-user Django + DRF app where agents, scripts,
or people publish artifacts and each logged-in user browses their own
time-ordered, label-filterable feed.

This squashes prior local development history (kept privately on a separate
branch) into a single clean starting point for the public repository.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
peter 2026-09-01 21:55:02 +01:00
commit 940a703cd7
62 changed files with 5755 additions and 0 deletions

View file

@ -0,0 +1,27 @@
from django.db import migrations
def backfill_owner(apps, schema_editor):
User = apps.get_model("auth", "User")
Artifact = apps.get_model("artifacts", "Artifact")
first_superuser = User.objects.filter(is_superuser=True).order_by("date_joined").first()
if first_superuser is None:
return
Artifact.objects.filter(owner__isnull=True).update(owner=first_superuser)
def noop_reverse(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
("artifacts", "0005_add_owner_nullable"),
]
operations = [
migrations.RunPython(backfill_owner, noop_reverse),
]