summaryrefslogtreecommitdiff
path: root/feeds.py
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-03-06 11:05:57 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-03-06 11:05:57 -0300
commit3aa14c9fbec24f5049e12a8dbb5ce059d2c8f5f3 (patch)
tree28755cf0ae66b145d752358c1f722c2d095e877a /feeds.py
parentc738e2c8f687f3417b90c951254121cce491843a (diff)
parent65e965c8f76677904f5d98965e13bf89726247d4 (diff)
Merge branch 'master' of git://projects.archlinux.org/archweb
Conflicts: media/archweb.css public/views.py urls.py
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()