summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-22 02:11:47 +0100
committerDan McGee <dan@archlinux.org>2012-12-28 02:59:52 +0100
commit730ac948b5dfb70646fad96cd7bad0453b9f0cea (patch)
treefca28b38b64494d121f70123d8d76952fd2d5371 /public
parenta993295002ad36b40c49619e892de6e78aa00c06 (diff)
downloadarchweb-730ac948b5dfb70646fad96cd7bad0453b9f0cea.tar.gz
archweb-730ac948b5dfb70646fad96cd7bad0453b9f0cea.tar.xz
Add a __unicode__ method for RecentUpdate
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public')
-rw-r--r--public/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/utils.py b/public/utils.py
index bf74881..c283821 100644
--- a/public/utils.py
+++ b/public/utils.py
@@ -49,6 +49,10 @@ class RecentUpdate(object):
if package.arch not in arches and not arches.add(package.arch):
yield PackageStandin(package)
+ def __unicode__(self):
+ return "RecentUpdate '%s %s' <%d packages>" % (
+ self.pkgbase, self.version, len(self.packages))
+
@cache_function(62)
def get_recent_updates(number=15, testing=True, staging=False):
repos = Repo.objects.all()