summaryrefslogtreecommitdiff
path: root/devel/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-07 13:04:34 -0600
committerDan McGee <dan@archlinux.org>2011-12-07 13:04:34 -0600
commit7b6ec8662a306c5754dbe4fe2484de61284942ac (patch)
treee987c0409c21247341d718ba65f2364181e30ce3 /devel/admin.py
parent94c5bda1c13960f8626b3c8e8ec47d9e3005f792 (diff)
Enhance devel model admin
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/admin.py')
-rw-r--r--devel/admin.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/devel/admin.py b/devel/admin.py
index 84082fb8..717ba1b2 100644
--- a/devel/admin.py
+++ b/devel/admin.py
@@ -1,12 +1,21 @@
from django.contrib import admin
-from .models import MasterKey
+from .models import MasterKey, PGPSignature
class MasterKeyAdmin(admin.ModelAdmin):
list_display = ('pgp_key', 'owner', 'created', 'revoker', 'revoked')
search_fields = ('pgp_key', 'owner', 'revoker')
+ date_hierarchy = 'created'
+
+class PGPSignatureAdmin(admin.ModelAdmin):
+ list_display = ('signer', 'signee', 'created', 'expires', 'valid')
+ list_filter = ('valid',)
+ search_fields = ('signer', 'signee')
+ date_hierarchy = 'created'
+
admin.site.register(MasterKey, MasterKeyAdmin)
+admin.site.register(PGPSignature, PGPSignatureAdmin)
# vim: set ts=4 sw=4 et: