ef148ea482
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.
22 lines
521 B
Python
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)
|