64 lines
1.9 KiB
Python
64 lines
1.9 KiB
Python
|
|
"""The admin, which is here for one reason: tier 1 is readable.
|
||
|
|
|
||
|
|
docs/architecture.md's argument against a CRDT is partly this — "the canonical
|
||
|
|
document moves into an opaque blob, and every server-side thing that reads the
|
||
|
|
document needs it materialised back out". A leaf is transit-as-JSON in a
|
||
|
|
JSONField, so it is legible here, and that is a property worth being able to see.
|
||
|
|
"""
|
||
|
|
from django.contrib import admin
|
||
|
|
|
||
|
|
from .models import Analysis, Block, Blob, Clip, Footage, FootageFrame, Leaf, Project, Revision
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Project)
|
||
|
|
class ProjectAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("name", "id", "seq", "updated")
|
||
|
|
search_fields = ("name", "id")
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Clip)
|
||
|
|
class ClipAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("cid", "project", "name", "footage", "analysis")
|
||
|
|
list_filter = ("project",)
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Leaf)
|
||
|
|
class LeafAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("path", "project", "version", "updated")
|
||
|
|
list_filter = ("project",)
|
||
|
|
search_fields = ("path",)
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Revision)
|
||
|
|
class RevisionAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("project", "seq", "summary", "author", "created")
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Footage)
|
||
|
|
class FootageAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("label", "source", "fps", "frames", "width", "height", "created")
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(FootageFrame)
|
||
|
|
class FootageFrameAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("footage", "index", "blob")
|
||
|
|
list_filter = ("footage",)
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Analysis)
|
||
|
|
class AnalysisAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("key", "detector", "version", "footage", "created")
|
||
|
|
search_fields = ("key", "detector", "version")
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Block)
|
||
|
|
class BlockAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("key", "role", "analysis", "data", "state", "created")
|
||
|
|
list_filter = ("role",)
|
||
|
|
search_fields = ("key",)
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Blob)
|
||
|
|
class BlobAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ("digest", "media_type", "size", "created")
|