diff options
author | Dan McGee <dan@archlinux.org> | 2011-12-12 14:03:36 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-12-12 14:03:36 +0100 |
commit | 78f23956e090d8e6967467030407738ca6c1d276 (patch) | |
tree | a3a7ceccfe99e9ab2e423b294534eff0dca8914e /packages | |
parent | a60801bb7dbc18080e7f6106bcf9c707d2801c9d (diff) | |
download | archweb-78f23956e090d8e6967467030407738ca6c1d276.tar.gz archweb-78f23956e090d8e6967467030407738ca6c1d276.tar.xz |
Add signoff model admin interface
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/admin.py | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/packages/admin.py b/packages/admin.py index 14fa896..44aa22f 100644 --- a/packages/admin.py +++ b/packages/admin.py @@ -1,11 +1,12 @@ from django.contrib import admin -from .models import PackageRelation, FlagRequest +from .models import PackageRelation, FlagRequest, Signoff, SignoffSpecification class PackageRelationAdmin(admin.ModelAdmin): - list_display = ('user', 'pkgbase', 'type', 'created') + list_display = ('pkgbase', 'user', 'type', 'created') list_filter = ('type', 'user') - search_fields = ('user__username', 'pkgbase') + search_fields = ('pkgbase', 'user__username') + ordering = ('pkgbase', 'user') date_hierarchy = 'created' class FlagRequestAdmin(admin.ModelAdmin): @@ -13,9 +14,30 @@ class FlagRequestAdmin(admin.ModelAdmin): 'message') list_filter = ('is_spam', 'is_legitimate') search_fields = ('pkgbase', 'user_email', 'message') + ordering = ('-created',) date_hierarchy = 'created' + +class SignoffAdmin(admin.ModelAdmin): + list_display = ('pkgbase', 'pkgver', 'pkgrel', 'arch', 'repo', + 'user', 'created', 'revoked') + list_filter = ('arch', 'repo', 'user') + search_fields = ('pkgbase', 'user__username') + ordering = ('-created',) + date_hierarchy = 'created' + +class SignoffSpecificationAdmin(admin.ModelAdmin): + list_display = ('pkgbase', 'pkgver', 'pkgrel', 'arch', 'repo', + 'user', 'created', 'comments') + list_filter = ('arch', 'repo', 'user') + search_fields = ('pkgbase', 'user__username') + ordering = ('-created',) + date_hierarchy = 'created' + + admin.site.register(PackageRelation, PackageRelationAdmin) admin.site.register(FlagRequest, FlagRequestAdmin) +admin.site.register(Signoff, SignoffAdmin) +admin.site.register(SignoffSpecification, SignoffSpecificationAdmin) # vim: set ts=4 sw=4 et: |