From 556c0824fbee8cbf63032298ab80b181a96858fa Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 2 Feb 2012 00:16:34 -0400 Subject: [PATCH] Return a QuerySet instead of a list of documents --- apps/tags/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/tags/views.py b/apps/tags/views.py index 712ecd86c9..aa6799343b 100644 --- a/apps/tags/views.py +++ b/apps/tags/views.py @@ -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,