Removed log components and introduced signals for tags & correspondents

This commit is contained in:
Daniel Quinn
2016-03-28 11:11:15 +01:00
parent 49b56425e8
commit b92e007e15
12 changed files with 175 additions and 140 deletions

View File

@@ -31,6 +31,13 @@ class MonthListFilter(admin.SimpleListFilter):
return queryset.filter(created__year=year, created__month=month)
class CorrespondentAdmin(admin.ModelAdmin):
list_display = ("name", "match", "matching_algorithm")
list_filter = ("matching_algorithm",)
list_editable = ("match", "matching_algorithm")
class TagAdmin(admin.ModelAdmin):
list_display = ("name", "colour", "match", "matching_algorithm")
@@ -103,11 +110,11 @@ class DocumentAdmin(admin.ModelAdmin):
class LogAdmin(admin.ModelAdmin):
list_display = ("message", "level", "component")
list_filter = ("level", "component",)
list_display = ("message", "level",)
list_filter = ("level",)
admin.site.register(Correspondent)
admin.site.register(Correspondent, CorrespondentAdmin)
admin.site.register(Tag, TagAdmin)
admin.site.register(Document, DocumentAdmin)
admin.site.register(Log, LogAdmin)