Return a QuerySet instead of a list of documents
This commit is contained in:
@@ -209,11 +209,10 @@ def tag_edit(request, tag_id):
|
||||
|
||||
def tag_tagged_item_list(request, tag_id):
|
||||
tag = get_object_or_404(Tag, pk=tag_id)
|
||||
object_list = [tagged_item.content_object for tagged_item in tag.taggit_taggeditem_items.all()]
|
||||
|
||||
return document_list(
|
||||
request,
|
||||
object_list=object_list,
|
||||
object_list=Document.objects.filter(tags__in=[tag]),
|
||||
title=_('documents with the tag "%s"') % tag,
|
||||
extra_context={
|
||||
'object': tag,
|
||||
|
||||
Reference in New Issue
Block a user