Skip to content
Snippets Groups Projects

Manage committee members from committee page in admin

Merged Thom Wiggers requested to merge committeemembership_inline into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
@@ -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',
Loading