Commits

funkybob  committed 925e9d3

Fixed tag filtering

  • Participants
  • Parent commits 8e2021c

Comments (0)

Files changed (2)

File gnocchi/blog/views.py

 from django.views.generic.dates import ArchiveIndexView, DateDetailView
 from django.http import HttpResponseRedirect
-
+from django.db.models import Q
 from gnocchi.blog import models, forms
 
 # This will roll for django-1.3
         qset = models.Post.objects.current()
         if self.username:
             qset = qset.filter(posted_by__username=self.username)
-        tags = self.request.GET.getlist('tags')
-        if tags:
-            qset = qset.filter(tags__in=tags)
+        for tag in self.request.GET.getlist('tags'):
+            qset = qset.filter(tags__name=tag)
         return qset
 
 class PostList(PostMixin, ArchiveIndexView):
     url = 'http://bitbucket.org/funkybob/gnocchi-blog/',
     keywords = [ 'django', 'blog', ],
     packages = find_packages(),
-    namespace_packages = ['gnocchi',],
     zip_safe = False,
     classifiers = [
         'Environment :: Web Environment',