Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /tannousgeagea_perceptra-hub /perceptra_hub /annotations /admin.py
| from django.contrib import admin | |
| from unfold.admin import ModelAdmin, TabularInline | |
| from .models import ( | |
| AnnotationGroup, | |
| AnnotationClass, | |
| AnnotationType, | |
| Annotation, | |
| AnnotationAudit, | |
| SuggestionSession, | |
| ) | |
| class AnnotationClassInline(TabularInline): | |
| model = AnnotationClass | |
| extra = 1 | |
| # Register your models here. | |
| class AnnotationGroupAdmin(ModelAdmin): | |
| list_display = ('id', 'name', 'project', 'created_at') | |
| search_fields = ('name', 'project__name') | |
| list_filter = ('project', 'created_at') | |
| ordering = ('-created_at',) | |
| readonly_fields = ('created_at',) | |
| inlines = [AnnotationClassInline] | |
| class AnnotationClassAdmin(ModelAdmin): | |
| list_display = ('id', 'class_id', 'name', 'annotation_group', 'color', 'created_at') | |
| search_fields = ('class_id', 'name', 'annotation_group__name', 'color') | |
| list_filter = ('annotation_group',) | |
| ordering = ('annotation_group', 'class_id') | |
| readonly_fields = ('created_at',) | |
| class AnnotationTypeAdmin(ModelAdmin): | |
| list_display = ('id', 'name', 'description', 'created_at') | |
| search_fields = ('name', 'description') | |
| list_filter = ('created_at',) | |
| ordering = ('-created_at',) | |
| readonly_fields = ('created_at',) | |
| class AnnotationAdmin(ModelAdmin): | |
| list_display = ('id', 'project_image', 'annotation_class', 'annotation_type','created_at', 'confidence', 'reviewed') | |
| search_fields = ('project_image__image__image_name', 'annotation_class__name', 'annotation_type__name', 'created_by') | |
| list_filter = ('annotation_class', 'annotation_type', 'created_at', 'project_image__project__name', 'reviewed') | |
| ordering = ('-created_at',) | |
| readonly_fields = ('created_at',) | |
| class AnnotationAuditAdmin(ModelAdmin): | |
| list_display = ("id", "annotation", "evaluation_status", "was_edited", "reviewed_at") | |
| list_filter = ("was_edited", "evaluation_status") | |
| search_fields = ("id", "annotation_id") | |
| class SuggestionSessionAdmin(ModelAdmin): | |
| list_display = ("id", "suggestion_id", "project_image", "source_type") |
Xet Storage Details
- Size:
- 2.24 kB
- Xet hash:
- 1d47d38eb1923855803e52496f750de28cf908aa60806dbdba3040acb07db308
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.