2016-06-30 03:39:07 +02:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2016-07-04 20:04:11 +02:00
|
|
|
from .models import User, School, Right, ListRight, Ban, Whitelist
|
2016-07-01 01:03:28 +02:00
|
|
|
|
|
|
|
class UserAdmin(admin.ModelAdmin):
|
2016-07-03 14:36:51 +02:00
|
|
|
list_display = ('name','surname','pseudo','room','email', 'school', 'state')
|
2016-07-01 01:03:28 +02:00
|
|
|
|
|
|
|
class SchoolAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name',)
|
|
|
|
|
2016-07-02 02:42:04 +02:00
|
|
|
class ListRightAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('listright',)
|
|
|
|
|
|
|
|
class RightAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('user', 'right')
|
|
|
|
|
2016-07-02 21:57:31 +02:00
|
|
|
class BanAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('user', 'raison', 'date_start', 'date_end')
|
|
|
|
|
2016-07-04 20:04:11 +02:00
|
|
|
class WhitelistAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('user', 'raison', 'date_start', 'date_end')
|
|
|
|
|
2016-07-01 01:03:28 +02:00
|
|
|
admin.site.register(User, UserAdmin)
|
|
|
|
admin.site.register(School, SchoolAdmin)
|
2016-07-02 02:42:04 +02:00
|
|
|
admin.site.register(Right, RightAdmin)
|
|
|
|
admin.site.register(ListRight, ListRightAdmin)
|
2016-07-02 21:57:31 +02:00
|
|
|
admin.site.register(Ban, BanAdmin)
|
2016-07-04 20:04:11 +02:00
|
|
|
admin.site.register(Whitelist, WhitelistAdmin)
|