]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
admin: Show series.submitter in admin view
authorStephen Finucane <stephen@that.guru>
Fri, 2 Nov 2018 17:34:10 +0000 (17:34 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 25 Dec 2018 20:11:22 +0000 (20:11 +0000)
Display this by default and allow filtering by it. While we're here,
also allow patches to be filtered by submitter.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/admin.py

index 9254167535c8c3bd78814ec727e400e1be5bcf6a..546e516dadf990f4ecfca607649a2f74455b06b7 100644 (file)
@@ -88,7 +88,7 @@ admin.site.register(CoverLetter, SubmissionAdmin)
 class PatchAdmin(admin.ModelAdmin):
     list_display = ('name', 'submitter', 'project', 'state', 'date',
                     'archived', 'is_pull_request')
-    list_filter = ('project', 'state', 'archived')
+    list_filter = ('project', 'submitter', 'state', 'archived')
     list_select_related = ('submitter', 'project', 'state')
     search_fields = ('name', 'submitter__name', 'submitter__email')
     date_hierarchy = 'date'
@@ -119,8 +119,10 @@ class PatchInline(admin.StackedInline):
 
 
 class SeriesAdmin(admin.ModelAdmin):
-    list_display = ('name', 'date', 'submitter', 'version', 'total',
+    list_display = ('name', 'submitter', 'project', 'date', 'version', 'total',
                     'received_total', 'received_all')
+    list_filter = ('project', 'submitter')
+    list_select_related = ('submitter', 'project')
     readonly_fields = ('received_total', 'received_all')
     search_fields = ('submitter_name', 'submitter_email')
     exclude = ('patches', )