Browse Source

Add admin for bounding box model

pull/1899/head
Hironsan 2 years ago
parent
commit
b8a4b0a0e9
1 changed files with 7 additions and 1 deletions
  1. 8
      backend/labels/admin.py

8
backend/labels/admin.py

@ -1,6 +1,6 @@
from django.contrib import admin
from .models import Category, Span, TextLabel
from .models import BoundingBox, Category, Span, TextLabel
class SpanAdmin(admin.ModelAdmin):
@ -18,6 +18,12 @@ class TextLabelAdmin(admin.ModelAdmin):
ordering = ("example",)
class BoundingBoxAdmin(admin.ModelAdmin):
list_display = ("example", "label", "user", "x", "y", "width", "height")
ordering = ("example",)
admin.site.register(Category, CategoryAdmin)
admin.site.register(Span, SpanAdmin)
admin.site.register(TextLabel, TextLabelAdmin)
admin.site.register(BoundingBox, BoundingBoxAdmin)
Loading…
Cancel
Save