diff options
author | Dan McGee <dan@archlinux.org> | 2011-12-07 13:04:34 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-12-07 13:04:34 -0600 |
commit | 7b6ec8662a306c5754dbe4fe2484de61284942ac (patch) | |
tree | e987c0409c21247341d718ba65f2364181e30ce3 /devel/models.py | |
parent | 94c5bda1c13960f8626b3c8e8ec47d9e3005f792 (diff) |
Enhance devel model admin
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/models.py')
-rw-r--r-- | devel/models.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/devel/models.py b/devel/models.py index 6c97375c..e46fbba1 100644 --- a/devel/models.py +++ b/devel/models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User @@ -17,6 +18,10 @@ class MasterKey(models.Model): class Meta: ordering = ('created',) + def __unicode__(self): + return u'%s, created %s' % ( + self.owner.get_full_name(), self.created) + class PGPSignature(models.Model): signer = PGPKeyField(max_length=40, verbose_name="PGP key fingerprint", @@ -24,10 +29,13 @@ class PGPSignature(models.Model): signee = PGPKeyField(max_length=40, verbose_name="PGP key fingerprint", help_text="consists of 40 hex digits; use `gpg --fingerprint`") created = models.DateField() - expires = models.DateField(null=True) + expires = models.DateField(null=True, blank=True) valid = models.BooleanField(default=True) class Meta: verbose_name = 'PGP signature' + def __unicode__(self): + return u'%s → %s' % (self.signer, self.signee) + # vim: set ts=4 sw=4 et: |