Merge branch 'master' into ui-improvements

This commit is contained in:
Jonas Winkler
2018-07-13 11:24:19 +02:00
19 changed files with 620 additions and 420 deletions

View File

@@ -81,17 +81,24 @@ class CommonAdmin(admin.ModelAdmin):
class CorrespondentAdmin(CommonAdmin):
list_display = ("name", "match", "matching_algorithm")
list_display = ("name", "match", "matching_algorithm", "document_count")
list_filter = ("matching_algorithm",)
list_editable = ("match", "matching_algorithm")
def document_count(self, obj):
return obj.documents.count()
class TagAdmin(CommonAdmin):
list_display = ("name", "colour", "match", "matching_algorithm")
list_display = ("name", "colour", "match", "matching_algorithm",
"document_count")
list_filter = ("colour", "matching_algorithm")
list_editable = ("colour", "match", "matching_algorithm")
def document_count(self, obj):
return obj.documents.count()
class DocumentAdmin(CommonAdmin):