comparison gpp/news/feeds.py @ 204:b4305e18d3af

Resolve ticket #74. Add user badges. Some extra credit was done here: also refactored how pending news, links, and downloads are handled.
author Brian Neal <bgneal@gmail.com>
date Sat, 01 May 2010 21:53:59 +0000
parents 9b63ad1f2ad2
children
comparison
equal deleted inserted replaced
203:40e5903903e1 204:b4305e18d3af
20 20
21 def feed_copyright(self): 21 def feed_copyright(self):
22 return copyright_str() 22 return copyright_str()
23 23
24 def items(self): 24 def items(self):
25 return Story.objects.order_by('-date_published')[:5] 25 return Story.objects.order_by('-date_submitted')[:5]
26 26
27 def item_title(self, item): 27 def item_title(self, item):
28 return item.title 28 return item.title
29 29
30 def item_description(self, item): 30 def item_description(self, item):
32 32
33 def item_author_name(self, item): 33 def item_author_name(self, item):
34 return get_full_name(item.submitter) 34 return get_full_name(item.submitter)
35 35
36 def item_pubdate(self, item): 36 def item_pubdate(self, item):
37 return item.date_published 37 return item.date_submitted
38 38
39 def item_categories(self, item): 39 def item_categories(self, item):
40 return (item.category.title, ) 40 return (item.category.title, )