summaryrefslogtreecommitdiff
path: root/devel/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'devel/admin.py')
-rw-r--r--devel/admin.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/devel/admin.py b/devel/admin.py
index 5a704c0b..971933b7 100644
--- a/devel/admin.py
+++ b/devel/admin.py
@@ -2,7 +2,7 @@ from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
-from .models import UserProfile, MasterKey, PGPSignature
+from .models import UserProfile, MasterKey, DeveloperKey, PGPSignature
class UserProfileInline(admin.StackedInline):
@@ -17,7 +17,14 @@ class UserProfileAdmin(UserAdmin):
class MasterKeyAdmin(admin.ModelAdmin):
list_display = ('pgp_key', 'owner', 'created', 'revoker', 'revoked')
- search_fields = ('pgp_key', 'owner', 'revoker')
+ search_fields = ('pgp_key', 'owner__username', 'revoker__username')
+ date_hierarchy = 'created'
+
+
+class DeveloperKeyAdmin(admin.ModelAdmin):
+ list_display = ('key', 'parent', 'owner', 'created', 'expires', 'revoked')
+ search_fields = ('key', 'owner__username')
+ list_filter = ('owner',)
date_hierarchy = 'created'
@@ -32,6 +39,7 @@ admin.site.unregister(User)
admin.site.register(User, UserProfileAdmin)
admin.site.register(MasterKey, MasterKeyAdmin)
+admin.site.register(DeveloperKey, DeveloperKeyAdmin)
admin.site.register(PGPSignature, PGPSignatureAdmin)
# vim: set ts=4 sw=4 et: