diff options
author | Dan McGee <dan@archlinux.org> | 2010-02-04 20:44:46 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-02-05 17:03:35 -0600 |
commit | b2f33457f646c9340059d4ab02b5b7280dbeff9d (patch) | |
tree | c0957a7592656144bb2f31342f455812f52036a3 /main/models.py | |
parent | 6fe8aec0abdfe284439e9d3adda85da8e5c3825b (diff) |
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 <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ class Package(models.Model): 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) |