Return a QuerySet instead of a list of documents

This commit is contained in:
Roberto Rosario
2012-02-02 00:16:34 -04:00
parent 78b73b81e3
commit 556c0824fb

View File

@@ -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,