diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-09 14:02:19 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-12 22:51:51 +0100 |
commit | 255a992c151b1c9386c3450083144447be2ce27a (patch) | |
tree | d3d6709a90f8a1bf4473a7fbd918e15864aed18d /packages | |
parent | ec2ab9ba35e83dce20789b48f52f3aec02d788fc (diff) | |
download | archweb-255a992c151b1c9386c3450083144447be2ce27a.tar.gz archweb-255a992c151b1c9386c3450083144447be2ce27a.tar.xz |
Add get_associated_packages method to FlagRequest
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/models.py b/packages/models.py index 18d57c5..ef86d8e 100644 --- a/packages/models.py +++ b/packages/models.py @@ -206,6 +206,13 @@ class FlagRequest(models.Model): return u'%d:%s-%s' % (self.epoch, self.pkgver, self.pkgrel) return u'%s-%s' % (self.pkgver, self.pkgrel) + def get_associated_packages(self): + return Package.objects.normal().filter( + pkgbase=self.pkgbase, + repo__testing=self.repo.testing, + repo__staging=self.repo.staging).order_by( + 'pkgname', 'repo__name', 'arch__name') + def __unicode__(self): return u'%s from %s on %s' % (self.pkgbase, self.who(), self.created) |