Add colours to the tags pages

This commit is contained in:
Daniel Quinn 2018-12-01 16:21:58 +00:00
parent c1f926a40c
commit 4f4c515629

View File

@ -152,6 +152,9 @@ class TagAdmin(CommonAdmin):
readonly_fields = ("slug",)
class Media:
js = ("js/colours.js",)
def get_queryset(self, request):
qs = super(TagAdmin, self).get_queryset(request)
qs = qs.annotate(document_count=models.Count("documents"))