tl/scenes/admin.py
Your Name 94475da936 Project create/list API, clip uploads, CORS, public read
- Project gains a clip FileField; POST /api/projects/ creates one from an
  uploaded otio + clip (<=100 MB), owned by the requester
- add /api/me/ and project-detail; scene GET is public (view without login),
  PUT stays owner/collaborator-only
- serve media in DEBUG (range requests for video seek); CORS for the cljs dev
  origin with credentials
- seed_demo now builds the Challengers project from the bundled otio + 480p clip

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 01:39:54 -04:00

25 lines
847 B
Python

from django.contrib import admin
from .models import Project, Revision
@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
list_display = ("name", "owner", "fps", "updated")
list_filter = ("owner",)
search_fields = ("name",)
filter_horizontal = ("collaborators",)
readonly_fields = ("created", "updated")
fields = ("name", "owner", "collaborators", "otio", "clip", "fps", "scene",
"created", "updated")
@admin.register(Revision)
class RevisionAdmin(admin.ModelAdmin):
list_display = ("project", "user", "created", "summary")
list_filter = ("project", "user")
date_hierarchy = "created"
readonly_fields = ("project", "user", "created", "summary", "annotations")
def has_add_permission(self, request):
return False # revisions are written by the API, not by hand