diff options
author | Dan McGee <dan@archlinux.org> | 2014-11-02 10:43:09 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2014-11-02 10:44:03 -0600 |
commit | 5bfe138a86a98b52f0b6746b900af6431cd4d17a (patch) | |
tree | dd10f445fe972c93aafe5ca56d86530a5ac042a2 /devel/admin.py | |
parent | 0c72812fde64f3ed039d807b9e8b3914960b7d6b (diff) |
Add new StaffGroup object
This will allow us to be a bit more dynamic in showing the people
listings on the website. We'll be adding a Support Staff category to
recognize those that do things around here but aren't technically
developers.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/admin.py')
-rw-r--r-- | devel/admin.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/devel/admin.py b/devel/admin.py index c8f80f95..d1729fe3 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, DeveloperKey, PGPSignature +from .models import UserProfile, StaffGroup, MasterKey, DeveloperKey, PGPSignature class UserProfileInline(admin.StackedInline): @@ -15,6 +15,11 @@ class UserProfileAdmin(UserAdmin): list_filter = ('is_staff', 'is_superuser', 'is_active') +class StaffGroupAdmin(admin.ModelAdmin): + list_display = ('name', 'group', 'sort_order', 'member_title', 'slug') + prepopulated_fields = {'slug': ('name',)} + + class MasterKeyAdmin(admin.ModelAdmin): list_display = ('pgp_key', 'owner', 'created', 'revoker', 'revoked') search_fields = ('pgp_key', 'owner__username', 'revoker__username') @@ -36,6 +41,7 @@ class PGPSignatureAdmin(admin.ModelAdmin): admin.site.unregister(User) admin.site.register(User, UserProfileAdmin) +admin.site.register(StaffGroup, StaffGroupAdmin) admin.site.register(MasterKey, MasterKeyAdmin) admin.site.register(DeveloperKey, DeveloperKeyAdmin) |