8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00
re2o/users/admin.py
2016-07-02 21:57:31 +02:00

24 lines
715 B
Python

from django.contrib import admin
from .models import User, School, Right, ListRight, Ban
class UserAdmin(admin.ModelAdmin):
list_display = ('name','surname','pseudo','email', 'school', 'state')
class SchoolAdmin(admin.ModelAdmin):
list_display = ('name',)
class ListRightAdmin(admin.ModelAdmin):
list_display = ('listright',)
class RightAdmin(admin.ModelAdmin):
list_display = ('user', 'right')
class BanAdmin(admin.ModelAdmin):
list_display = ('user', 'raison', 'date_start', 'date_end')
admin.site.register(User, UserAdmin)
admin.site.register(School, SchoolAdmin)
admin.site.register(Right, RightAdmin)
admin.site.register(ListRight, ListRightAdmin)
admin.site.register(Ban, BanAdmin)