summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-08-16 18:58:22 +0200
committerDusty Phillips <buchuki@gmail.com>2008-08-16 19:01:27 +0200
commite1fa499f637e00f5e7eb91ec460903558b46017a (patch)
tree9b842e19522e0b9ffd2dc2ebce5b65e6113cf25f /main
parenta3a0e4a4e23e8f3102a5686254ac3bc7fa883cc5 (diff)
downloadarchweb-e1fa499f637e00f5e7eb91ec460903558b46017a.tar.gz
archweb-e1fa499f637e00f5e7eb91ec460903558b46017a.tar.xz
add signoff model for capturing signoffs
Diffstat (limited to 'main')
-rw-r--r--main/models.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index f7d4c2c..7cd00bf 100644
--- a/main/models.py
+++ b/main/models.py
@@ -266,6 +266,17 @@ class Package(models.Model):
deps.append({'dep': dep, 'pkg': pkg})
return deps
+class Signoff(models.Model):
+ pkg = models.ForeignKey(Package)
+ pkgver = models.CharField(maxlength=255)
+ pkgrel = models.CharField(maxlength=255)
+ signed_off = models.ManyToManyField(User)
+
+ def is_approved(self):
+ if signed_off.all().count() > 2:
+ return True
+ return False
+
class PackageFile(models.Model):
id = models.AutoField(primary_key=True)
pkg = models.ForeignKey('Package')