summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-17 16:18:12 -0500
committerDan McGee <dan@archlinux.org>2011-08-17 16:18:12 -0500
commite5d09fb7e9003b7f96685af9c0a722b45746448e (patch)
tree98d9a7ffd9f240c70a13e4444c5c14a2bdc82b90 /main/models.py
parenta52c2744bf3b532f3f02ce45ae9d902706f9f518 (diff)
Add PGP signature package field
And add eventual display code for it to the details template, but don't show it yet as no packages will have it. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index 0125cc0e..e0681abf 100644
--- a/main/models.py
+++ b/main/models.py
@@ -82,6 +82,7 @@ class UserProfile(models.Model):
help_text="Ideally 125px by 125px")
user = models.OneToOneField(User, related_name='userprofile')
allowed_repos = models.ManyToManyField('Repo', blank=True)
+
class Meta:
db_table = 'user_profiles'
verbose_name = 'Additional Profile Data'
@@ -173,6 +174,7 @@ class Package(models.Model):
packager_str = models.CharField(max_length=255)
packager = models.ForeignKey(User, null=True,
on_delete=models.SET_NULL)
+ pgp_signature = models.TextField(null=True, blank=True)
flag_date = models.DateTimeField(null=True)
objects = PackageManager()
@@ -199,6 +201,9 @@ class Package(models.Model):
domain = Site.objects.get_current().domain
return '%s://%s%s' % (proto, domain, self.get_absolute_url())
+ def is_signed(self):
+ return bool(self.pgp_signature)
+
@property
def maintainers(self):
return User.objects.filter(
@@ -288,7 +293,6 @@ class Package(models.Model):
if not pkg:
providers = dep.get_providers(arches,
testing=self.repo.testing, staging=self.repo.staging)
- print providers
deps.append({'dep': dep, 'pkg': pkg, 'providers': providers})
return deps