Verified Commit 96ff2d5c authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add filter for 'active' and more display fields to committee admin

parent f93d2ab3
......@@ -31,7 +31,8 @@ class CommitteeMembershipInline(admin.StackedInline):
class CommitteeAdmin(TranslatedModelAdmin):
inlines = (CommitteeMembershipInline,)
list_filter = ('until',)
list_display = ('name', 'since', 'until', 'active', 'email')
list_filter = ('until', 'active',)
search_fields = ('name', 'description')
filter_horizontal = ('permissions',)
......@@ -39,6 +40,13 @@ class CommitteeAdmin(TranslatedModelAdmin):
'until', 'contact_mailinglist', 'contact_email',
'wiki_namespace', 'active')
def email(self, instance):
if instance.contact_email:
return instance.contact_email
elif instance.contact_mailinglist:
return + ''
return None
def get_queryset(self, request):
qs = super().get_queryset(request)
return qs.exclude(board__is_board=True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment