a bit more work on the team admin

This commit is contained in:
Thomas Steen Rasmussen 2017-04-08 09:39:43 +02:00
parent ae355516ba
commit 1bb2b8d9a9

View file

@ -6,8 +6,20 @@ admin.site.register(TeamArea)
@admin.register(Team)
class TeamAdmin(admin.ModelAdmin):
def get_responsible(self, obj):
return ", ".join([resp.get_full_name() for resp in obj.responsible])
get_responsible.short_description = 'Responsible'
list_display = [
'name',
'area',
'get_responsible',
'needs_members',
]
list_filter = [
'camp',
'needs_members',
]
@admin.register(TeamMember)