Unverified Commit b35e34aa authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Manage committee members from committee page in admin

Fixes #196
parent 73711818
......@@ -5,8 +5,16 @@ from utils.translation import TranslatedModelAdmin
from . import models
class CommitteeMembershipInline(admin.StackedInline):
model = models.CommitteeMembership
can_delete = False
ordering = ('since',)
extra = 0
@admin.register(models.Committee)
class CommitteeAdmin(TranslatedModelAdmin):
inlines = (CommitteeMembershipInline,)
list_filter = ('until',)
fields = ('name', 'description', 'photo', 'permissions',
......@@ -19,6 +27,7 @@ class CommitteeAdmin(TranslatedModelAdmin):
@admin.register(models.Board)
class BoardAdmin(TranslatedModelAdmin):
inlines = (CommitteeMembershipInline,)
exclude = ('is_board',)
fields = ('name', 'photo', 'permissions',
......
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