Commit ba7b9d76 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'committeemembership_inline' into 'master'

Manage committee members from committee page in admin

Fixes #196

See merge request !226
parents f9cfc7a4 b35e34aa
......@@ -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