summaryrefslogtreecommitdiff
path: root/devel/admin.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:24:30 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:24:30 -0500
commitf9ae4f860ccf57e84032d7be9426331a9e06e979 (patch)
treec9d837d7e2750d22ba9049abc7cf3c4125f0c9e4 /devel/admin.py
parent6c5c3355a97d35afb7f1eee284966ad0bf8cee3b (diff)
parent206000df736fde75a49c3178a8522d17f30a955e (diff)
Merge tag 'release_2012-04-21'
Migrations, moving code around, random small improvements
Diffstat (limited to 'devel/admin.py')
-rw-r--r--devel/admin.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/devel/admin.py b/devel/admin.py
index 717ba1b2..5a704c0b 100644
--- a/devel/admin.py
+++ b/devel/admin.py
@@ -1,6 +1,18 @@
from django.contrib import admin
+from django.contrib.auth.admin import UserAdmin
+from django.contrib.auth.models import User
-from .models import MasterKey, PGPSignature
+from .models import UserProfile, MasterKey, PGPSignature
+
+
+class UserProfileInline(admin.StackedInline):
+ model = UserProfile
+
+
+class UserProfileAdmin(UserAdmin):
+ inlines = [UserProfileInline]
+ list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff', 'is_active')
+ list_filter = ('is_staff', 'is_superuser', 'is_active')
class MasterKeyAdmin(admin.ModelAdmin):
@@ -8,6 +20,7 @@ class MasterKeyAdmin(admin.ModelAdmin):
search_fields = ('pgp_key', 'owner', 'revoker')
date_hierarchy = 'created'
+
class PGPSignatureAdmin(admin.ModelAdmin):
list_display = ('signer', 'signee', 'created', 'expires', 'valid')
list_filter = ('valid',)
@@ -15,6 +28,9 @@ class PGPSignatureAdmin(admin.ModelAdmin):
date_hierarchy = 'created'
+admin.site.unregister(User)
+admin.site.register(User, UserProfileAdmin)
+
admin.site.register(MasterKey, MasterKeyAdmin)
admin.site.register(PGPSignature, PGPSignatureAdmin)