summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
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