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
|
2016-06-30 23:03:28 +00:00
|
|
|
|
|
|
|
class UserAdmin(admin.ModelAdmin):
|
2016-07-03 12:36:51 +00:00
|
|
|
list_display = ('name','surname','pseudo','room','email', 'school', 'state')
|
2016-06-30 23:03:28 +00:00
|
|
|
|
|
|
|
class SchoolAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name',)
|
|
|
|
|
2016-07-02 00:42:04 +00:00
|
|
|
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')
|
|
|
|
|
2016-06-30 23:03:28 +00:00
|
|
|
admin.site.register(User, UserAdmin)
|
|
|
|
admin.site.register(School, SchoolAdmin)
|
2016-07-02 00:42:04 +00:00
|
|
|
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)
|