daybook/artifacts/admin.py
peter 940a703cd7 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>
2026-09-01 21:55:02 +01:00

23 lines
791 B
Python

from django.contrib import admin
from .models import Artifact, Asset, UserProfile
@admin.register(Artifact)
class ArtifactAdmin(admin.ModelAdmin):
list_display = ("id", "title", "owner", "source", "kind", "is_kept", "size_bytes", "day", "created_at")
list_filter = ("owner", "source", "source_type", "kind", "is_kept", "day")
search_fields = ("id", "title", "source", "source_name", "source_id")
@admin.register(UserProfile)
class UserProfileAdmin(admin.ModelAdmin):
list_display = ("user", "quota_bytes")
search_fields = ("user__username",)
@admin.register(Asset)
class AssetAdmin(admin.ModelAdmin):
list_display = ("id", "owner", "artifact", "content_type", "size_bytes", "created_at")
list_filter = ("owner", "content_type")
search_fields = ("id",)