From b2f33457f646c9340059d4ab02b5b7280dbeff9d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 4 Feb 2010 20:44:46 -0600 Subject: Make recent updates group multiple architectures It isn't the most elegant operation in the world, but attempt to only show one line per package, grouping by architecture if multiple were updated in the same go. This makes the recent packages view a bit more useful as a heads up view. Implements FS#17304. Signed-off-by: Dan McGee --- main/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main') diff --git a/main/models.py b/main/models.py index 16fe73e4..066e0ee6 100644 --- a/main/models.py +++ b/main/models.py @@ -276,6 +276,12 @@ def get_bugs_link(self): return "http://bugs.archlinux.org/?project=%d&string=%s" % \ (project, self.pkgname) + def is_same_version(self, other): + 'is this package similar, name and version-wise, to another' + return self.pkgname == other.pkgname \ + and self.pkgver == other.pkgver \ + and self.pkgrel == other.pkgrel + class Signoff(models.Model): pkg = models.ForeignKey(Package) -- cgit v1.2.3-54-g00ecf