Add owner and team count to Org admin

This commit is contained in:
Michael Hall 2018-09-27 18:00:42 -04:00
parent 3d74d9395c
commit cd0496fa11

View file

@ -107,7 +107,10 @@ class ProfileAdmin(admin.ModelAdmin):
admin.site.register(UserProfile, ProfileAdmin)
class OrgAdmin(admin.ModelAdmin):
list_display = ('name', 'slug', 'site')
list_display = ('name', 'slug', 'team_count', 'owner_profile', 'site')
def team_count(self, org):
return org.teams.all().count()
team_count.short_description = 'Teams'
admin.site.register(Organization, OrgAdmin)
class OrgRequestAdmin(admin.ModelAdmin):