symposion_app/symposion/teams/admin.py
2016-02-27 16:38:27 -06:00

16 lines
416 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"]
search_fields = ["user__username"]
admin.site.register(Membership, MembershipAdmin)