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.

23 lines
758 B

  1. from django.contrib import admin
  2. from .models import (Project, Seq2seqProject, SequenceLabelingProject, Tag,
  3. TextClassificationProject)
  4. class ProjectAdmin(admin.ModelAdmin):
  5. list_display = ('name', 'description', 'project_type', 'random_order', 'collaborative_annotation')
  6. ordering = ('project_type',)
  7. search_fields = ('name',)
  8. class TagAdmin(admin.ModelAdmin):
  9. list_display = ('project', 'text', )
  10. ordering = ('project', 'text', )
  11. search_fields = ('text',)
  12. admin.site.register(Project, ProjectAdmin)
  13. admin.site.register(TextClassificationProject, ProjectAdmin)
  14. admin.site.register(SequenceLabelingProject, ProjectAdmin)
  15. admin.site.register(Seq2seqProject, ProjectAdmin)
  16. admin.site.register(Tag, TagAdmin)