2012-07-28 17:05:01 -04:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2016-02-27 16:38:27 -06:00
|
|
|
from reversion.admin import VersionAdmin
|
2012-07-28 17:05:01 -04:00
|
|
|
|
|
|
|
from symposion.teams.models import Team, Membership
|
|
|
|
|
|
|
|
admin.site.register(Team,
|
2014-07-30 15:19:26 -03:00
|
|
|
prepopulated_fields={"slug": ("name",)})
|
2012-07-28 17:05:01 -04:00
|
|
|
|
|
|
|
|
2016-02-27 16:38:27 -06:00
|
|
|
class MembershipAdmin(VersionAdmin):
|
2012-07-28 17:05:01 -04:00
|
|
|
list_display = ["team", "user", "state"]
|
|
|
|
list_filter = ["team"]
|
|
|
|
search_fields = ["user__username"]
|
|
|
|
|
2017-04-17 22:51:48 +10:00
|
|
|
|
2012-07-28 17:05:01 -04:00
|
|
|
admin.site.register(Membership, MembershipAdmin)
|