Closes #6038: Include tagged objects list on tag view

This commit is contained in:
Jeremy Stretch
2021-03-29 16:53:41 -04:00
parent eac53a779b
commit c7040fd418
4 changed files with 22 additions and 16 deletions

View File

@@ -39,8 +39,14 @@ class TagView(generic.ObjectView):
def get_extra_context(self, request, instance):
tagged_items = TaggedItem.objects.filter(tag=instance)
taggeditem_table = tables.TaggedItemTable(
data=tagged_items,
orderable=False
)
paginate_table(taggeditem_table, request)
return {
'taggeditem_table': taggeditem_table,
'tagged_item_count': tagged_items.count(),
}