|
@ -6,41 +6,47 @@ from .models import TextClassificationProject, SequenceLabelingProject, Seq2seqP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LabelAdmin(admin.ModelAdmin): |
|
|
class LabelAdmin(admin.ModelAdmin): |
|
|
list_display = ('text', 'project','text_color','background_color') |
|
|
|
|
|
|
|
|
list_display = ('text', 'project', 'text_color', 'background_color') |
|
|
ordering = ('project',) |
|
|
ordering = ('project',) |
|
|
search_fields = ('project',) |
|
|
search_fields = ('project',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DocumentAdmin(admin.ModelAdmin): |
|
|
class DocumentAdmin(admin.ModelAdmin): |
|
|
list_display = ('text', 'project','meta') |
|
|
|
|
|
|
|
|
list_display = ('text', 'project', 'meta') |
|
|
ordering = ('project',) |
|
|
ordering = ('project',) |
|
|
search_fields = ('project',) |
|
|
search_fields = ('project',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectAdmin(admin.ModelAdmin): |
|
|
class ProjectAdmin(admin.ModelAdmin): |
|
|
list_display = ('name', 'description','project_type','randomize_document_order') |
|
|
|
|
|
|
|
|
list_display = ('name', 'description', 'project_type', 'randomize_document_order') |
|
|
ordering = ('project_type',) |
|
|
ordering = ('project_type',) |
|
|
search_fields = ('name',) |
|
|
search_fields = ('name',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SequenceAnnotationAdmin(admin.ModelAdmin): |
|
|
class SequenceAnnotationAdmin(admin.ModelAdmin): |
|
|
list_display = ('document', 'label','start_offset','user') |
|
|
|
|
|
|
|
|
list_display = ('document', 'label', 'start_offset', 'user') |
|
|
ordering = ('document',) |
|
|
ordering = ('document',) |
|
|
search_fields = ('document',) |
|
|
search_fields = ('document',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DocumentAnnotationAdmin(admin.ModelAdmin): |
|
|
class DocumentAnnotationAdmin(admin.ModelAdmin): |
|
|
list_display = ('document', 'label','user') |
|
|
|
|
|
|
|
|
list_display = ('document', 'label', 'user') |
|
|
ordering = ('document',) |
|
|
ordering = ('document',) |
|
|
search_fields = ('document',) |
|
|
search_fields = ('document',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Seq2seqAnnotationAdmin(admin.ModelAdmin): |
|
|
class Seq2seqAnnotationAdmin(admin.ModelAdmin): |
|
|
list_display = ('document', 'text','user') |
|
|
|
|
|
|
|
|
list_display = ('document', 'text', 'user') |
|
|
ordering = ('document',) |
|
|
ordering = ('document',) |
|
|
search_fields = ('document',) |
|
|
search_fields = ('document',) |
|
|
|
|
|
|
|
|
admin.site.register(DocumentAnnotation,DocumentAnnotationAdmin) |
|
|
|
|
|
admin.site.register(SequenceAnnotation,SequenceAnnotationAdmin) |
|
|
|
|
|
admin.site.register(Seq2seqAnnotation,Seq2seqAnnotationAdmin) |
|
|
|
|
|
admin.site.register(Label,LabelAdmin) |
|
|
|
|
|
admin.site.register(Document,DocumentAdmin) |
|
|
|
|
|
admin.site.register(Project,ProjectAdmin) |
|
|
|
|
|
admin.site.register(TextClassificationProject,ProjectAdmin) |
|
|
|
|
|
admin.site.register(SequenceLabelingProject,ProjectAdmin) |
|
|
|
|
|
admin.site.register(Seq2seqProject,ProjectAdmin) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(DocumentAnnotation, DocumentAnnotationAdmin) |
|
|
|
|
|
admin.site.register(SequenceAnnotation, SequenceAnnotationAdmin) |
|
|
|
|
|
admin.site.register(Seq2seqAnnotation, Seq2seqAnnotationAdmin) |
|
|
|
|
|
admin.site.register(Label, LabelAdmin) |
|
|
|
|
|
admin.site.register(Document, DocumentAdmin) |
|
|
|
|
|
admin.site.register(Project, ProjectAdmin) |
|
|
|
|
|
admin.site.register(TextClassificationProject, ProjectAdmin) |
|
|
|
|
|
admin.site.register(SequenceLabelingProject, ProjectAdmin) |
|
|
|
|
|
admin.site.register(Seq2seqProject, ProjectAdmin) |