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.
 
 
 
 
 
 

46 lines
1.0 KiB

from django.contrib import admin
from .models import (
Member,
Project,
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(Tag, TagAdmin)