symposion_app/vendor/symposion/teams/admin.py
Joel Addison ef148ea482 Update teams management
Update styling to use Bootstrap 4. Make current user status clear.
Show member name as well as email address.
Make permissions impler to set on team admin form.
2020-11-29 14:36:56 +10:00

22 lines
521 B
Python

from django.contrib import admin
from reversion.admin import VersionAdmin
from symposion.teams.models import Team, Membership
class TeamAdmin(admin.ModelAdmin):
prepopulated_fields={"slug": ("name",)}
filter_horizontal = ('permissions', 'manager_permissions',)
admin.site.register(Team, TeamAdmin)
class MembershipAdmin(VersionAdmin):
list_display = ["team", "user", "state"]
list_filter = ["team","state"]
search_fields = ["user__username"]
admin.site.register(Membership, MembershipAdmin)