summaryrefslogtreecommitdiff
path: root/devel/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'devel/models.py')
-rw-r--r--devel/models.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/devel/models.py b/devel/models.py
index 6689ca3d..67de40a6 100644
--- a/devel/models.py
+++ b/devel/models.py
@@ -68,7 +68,6 @@ class UserProfile(models.Model):
return '/%s/#%s' % (prefix, self.user.username)
-
class MasterKey(models.Model):
owner = models.ForeignKey(User, related_name='masterkey_owner',
help_text="The developer holding this master key")
@@ -88,6 +87,20 @@ class MasterKey(models.Model):
self.owner.get_full_name(), self.created)
+class DeveloperKey(models.Model):
+ owner = models.ForeignKey(User, related_name='all_keys', null=True,
+ help_text="The developer this key belongs to")
+ key = PGPKeyField(max_length=40, verbose_name="PGP key fingerprint",
+ unique=True)
+ created = models.DateTimeField()
+ expires = models.DateTimeField(null=True, blank=True)
+ revoked = models.DateTimeField(null=True, blank=True)
+ parent = models.ForeignKey('self', null=True, on_delete=models.SET_NULL)
+
+ def __unicode__(self):
+ return self.key
+
+
class PGPSignature(models.Model):
signer = PGPKeyField(max_length=40, verbose_name="Signer key fingerprint")
signee = PGPKeyField(max_length=40, verbose_name="Signee key fingerprint")