Add owner and team count to Org admin
This commit is contained in:
parent
3d74d9395c
commit
cd0496fa11
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue