diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-03-06 11:05:57 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-03-06 11:05:57 -0300 |
commit | 3aa14c9fbec24f5049e12a8dbb5ce059d2c8f5f3 (patch) | |
tree | 28755cf0ae66b145d752358c1f722c2d095e877a /feeds.py | |
parent | c738e2c8f687f3417b90c951254121cce491843a (diff) | |
parent | 65e965c8f76677904f5d98965e13bf89726247d4 (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.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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() |