symposion_app/vendor/symposion/teams/admin.py

23 lines
521 B
Python
Raw Normal View History

2012-07-28 21:05:01 +00:00
from django.contrib import admin
from reversion.admin import VersionAdmin
2012-07-28 21:05:01 +00:00
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)
2012-07-28 21:05:01 +00:00
class MembershipAdmin(VersionAdmin):
2012-07-28 21:05:01 +00:00
list_display = ["team", "user", "state"]
list_filter = ["team","state"]
2012-07-28 21:05:01 +00:00
search_fields = ["user__username"]
2012-07-28 21:05:01 +00:00
admin.site.register(Membership, MembershipAdmin)