Add a __unicode__ method for RecentUpdate

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-12-21 19:11:47 -06:00
parent a993295002
commit 730ac948b5

View File

@ -49,6 +49,10 @@ def package_links(self):
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()