summaryrefslogtreecommitdiff
path: root/feeds.py
diff options
context:
space:
mode:
Diffstat (limited to 'feeds.py')
-rw-r--r--feeds.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/feeds.py b/feeds.py
index 3f1e95f0..bff97cba 100644
--- a/feeds.py
+++ b/feeds.py
@@ -62,7 +62,8 @@ class PackageFeed(Feed):
def get_object(self, request, arch='', repo=''):
obj = dict()
- qs = Package.objects.select_related('arch', 'repo').order_by('-last_update')
+ qs = Package.objects.select_related('arch', 'repo').order_by(
+ '-last_update')
if arch != '':
# feed for a single arch, also include 'any' packages everywhere
@@ -142,11 +143,11 @@ class NewsFeed(Feed):
return wrapper(super(NewsFeed, self).__call__)(request, *args, **kwargs)
def items(self):
- return News.objects.select_related('author').order_by('-postdate', '-id')[:10]
+ return News.objects.select_related('author').order_by(
+ '-postdate', '-id')[:10]
def item_pubdate(self, item):
- d = item.postdate
- return datetime.datetime(d.year, d.month, d.day)
+ return item.postdate
def item_author_name(self, item):
return item.author.get_full_name()