##// END OF EJS Templates
Fixed RSS items. Now getting the latest ones instead of the earliest.
neko259 -
r214:eb81a357 default
parent child Browse files
Show More
@@ -16,7 +16,7 b' class AllThreadsFeed(Feed):'
16 16 description_template = 'boards/rss/post.html'
17 17
18 18 def items(self):
19 return Post.objects.get_threads(order_by='-pub_time')[:MAX_ITEMS]
19 return Post.objects.get_threads(order_by='-pub_time')[-MAX_ITEMS:]
20 20
21 21 def item_title(self, item):
22 22 return item.title
@@ -35,7 +35,7 b' class TagThreadsFeed(Feed):'
35 35
36 36 def items(self, obj):
37 37 return Post.objects.get_threads(tag=obj,
38 order_by='-pub_time')[:MAX_ITEMS]
38 order_by='-pub_time')[-MAX_ITEMS:]
39 39
40 40 def get_object(self, request, tag_name):
41 41 return get_object_or_404(Tag, name=tag_name)
@@ -59,7 +59,7 b' class ThreadPostsFeed(Feed):'
59 59 description_template = 'boards/rss/post.html'
60 60
61 61 def items(self, obj):
62 return Post.objects.get_thread(opening_post_id=obj)[:MAX_ITEMS]
62 return Post.objects.get_thread(opening_post_id=obj)[-MAX_ITEMS:]
63 63
64 64 def get_object(self, request, post_id):
65 65 return post_id
General Comments 0
You need to be logged in to leave comments. Login now