diff options
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index 2079deeb..558d50c6 100644 --- a/main/models.py +++ b/main/models.py @@ -329,6 +329,13 @@ class Package(models.Model): except Package.DoesNotExist: return None + def elsewhere(self): + '''attempt to locate this package anywhere else, regardless of + architecture or repository. Excludes this package from the list.''' + return Package.objects.select_related('arch', 'repo').filter( + pkgname=self.pkgname).exclude(id=self.id).order_by( + 'arch__name', 'repo__name') + class Signoff(models.Model): pkg = models.ForeignKey(Package) pkgver = models.CharField(max_length=255) |