8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-16 16:33:12 +00:00
re2o/users/admin.py

29 lines
885 B
Python
Raw Normal View History

2016-06-30 01:39:07 +00:00
from django.contrib import admin
2016-07-04 18:04:11 +00:00
from .models import User, School, Right, ListRight, Ban, Whitelist
class UserAdmin(admin.ModelAdmin):
list_display = ('name','surname','pseudo','room','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')
2016-07-02 19:57:31 +00:00
class BanAdmin(admin.ModelAdmin):
list_display = ('user', 'raison', 'date_start', 'date_end')
2016-07-04 18:04:11 +00:00
class WhitelistAdmin(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)
2016-07-02 19:57:31 +00:00
admin.site.register(Ban, BanAdmin)
2016-07-04 18:04:11 +00:00
admin.site.register(Whitelist, WhitelistAdmin)