mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
from django.contrib import admin
|
|
|
|
from .models import (
|
|
BoundingBoxProject,
|
|
ImageCaptioningProject,
|
|
ImageClassificationProject,
|
|
Member,
|
|
Project,
|
|
SegmentationProject,
|
|
Seq2seqProject,
|
|
SequenceLabelingProject,
|
|
Tag,
|
|
TextClassificationProject,
|
|
)
|
|
|
|
|
|
class MemberAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
"user",
|
|
"role",
|
|
"project",
|
|
)
|
|
ordering = ("user",)
|
|
search_fields = ("user__username",)
|
|
|
|
|
|
class ProjectAdmin(admin.ModelAdmin):
|
|
list_display = ("name", "description", "project_type", "random_order", "collaborative_annotation")
|
|
ordering = ("project_type",)
|
|
search_fields = ("name",)
|
|
|
|
|
|
class TagAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
"project",
|
|
"text",
|
|
)
|
|
ordering = (
|
|
"project",
|
|
"text",
|
|
)
|
|
search_fields = ("text",)
|
|
|
|
|
|
admin.site.register(Member, MemberAdmin)
|
|
admin.site.register(Project, ProjectAdmin)
|
|
admin.site.register(TextClassificationProject, ProjectAdmin)
|
|
admin.site.register(SequenceLabelingProject, ProjectAdmin)
|
|
admin.site.register(Seq2seqProject, ProjectAdmin)
|
|
admin.site.register(BoundingBoxProject, ProjectAdmin)
|
|
admin.site.register(SegmentationProject, ProjectAdmin)
|
|
admin.site.register(ImageCaptioningProject, ProjectAdmin)
|
|
admin.site.register(ImageClassificationProject, ProjectAdmin)
|
|
admin.site.register(Tag, TagAdmin)
|