symposion_app/vendor/symposion/teams/admin.py
2017-10-14 14:31:57 +11:00

17 lines
425 B
Python

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