summaryrefslogtreecommitdiff
path: root/packages/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-25 09:54:24 -0700
committerDan McGee <dan@archlinux.org>2013-01-25 09:54:24 -0700
commit4244ff7a42566949f8ee85e922ed48f4a80407f7 (patch)
tree21caf4d67aa36d06c6a921608901ad059752e744 /packages/admin.py
parentf9252df1138ae388168cf76cb3d654a2abbce4ec (diff)
parentdc6cc49f6f876983f76f5f8c05a2285801f27ea0 (diff)
Merge branch 'on-the-plane'release_2013-01-25
Diffstat (limited to 'packages/admin.py')
-rw-r--r--packages/admin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/admin.py b/packages/admin.py
index 5e32dbb4..820bbb29 100644
--- a/packages/admin.py
+++ b/packages/admin.py
@@ -3,6 +3,7 @@ from django.contrib import admin
from .models import (PackageRelation, FlagRequest,
Signoff, SignoffSpecification, Update)
+
class PackageRelationAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'user', 'type', 'created')
list_filter = ('type', 'user')
@@ -19,6 +20,10 @@ class FlagRequestAdmin(admin.ModelAdmin):
ordering = ('-created',)
date_hierarchy = 'created'
+ def queryset(self, request):
+ qs = super(FlagRequestAdmin, self).queryset(request)
+ return qs.select_related('repo', 'user')
+
class SignoffAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'full_version', 'arch', 'repo',
@@ -28,6 +33,7 @@ class SignoffAdmin(admin.ModelAdmin):
ordering = ('-created',)
date_hierarchy = 'created'
+
class SignoffSpecificationAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'full_version', 'arch', 'repo',
'user', 'created', 'comments')
@@ -36,6 +42,10 @@ class SignoffSpecificationAdmin(admin.ModelAdmin):
ordering = ('-created',)
date_hierarchy = 'created'
+ def queryset(self, request):
+ qs = super(SignoffSpecificationAdmin, self).queryset(request)
+ return qs.select_related('arch', 'repo', 'user')
+
class UpdateAdmin(admin.ModelAdmin):
list_display = ('pkgname', 'repo', 'arch', 'action_flag',