diff --git a/boards/rss.py b/boards/rss.py --- a/boards/rss.py +++ b/boards/rss.py @@ -1,7 +1,7 @@ from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 -from boards.models import Post, Tag, Thread +from boards.models import Post, Tag, Thread, TagAlias from boards import settings from boards.models.thread import STATUS_ARCHIVE @@ -37,10 +37,10 @@ class TagThreadsFeed(Feed): description_template = 'boards/rss/post.html' def items(self, obj): - return Post.objects.filter(opening=True, thread__tags__in=[obj]).exclude(thread__status=STATUS_ARCHIVE).order_by('-id')[:MAX_ITEMS] + return Post.objects.filter(opening=True, thread__tags__aliases__name__in=[obj]).exclude(thread__status=STATUS_ARCHIVE).order_by('-id')[:MAX_ITEMS] def get_object(self, request, tag_name): - return get_object_or_404(Tag, name=tag_name) + return get_object_or_404(TagAlias, name=tag_name).parent def item_title(self, item): return item.title @@ -52,7 +52,7 @@ class TagThreadsFeed(Feed): return item.pub_time def title(self, obj): - return obj.name + return obj.get_name() class ThreadPostsFeed(Feed):