From 513933abbac7f1a92c3edb1c3fe3457644039ad6 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Mon, 2 Apr 2018 03:35:07 +0200 Subject: [PATCH] Register club et adherent admin pour histo --- users/admin.py | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/users/admin.py b/users/admin.py index f8acb855..a6b70009 100644 --- a/users/admin.py +++ b/users/admin.py @@ -32,11 +32,28 @@ from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from reversion.admin import VersionAdmin -from .models import User, ServiceUser, School, ListRight, ListShell -from .models import Ban, Whitelist, Request, LdapUser, LdapServiceUser -from .models import LdapServiceUserGroup, LdapUserGroup -from .forms import UserChangeForm, UserCreationForm -from .forms import ServiceUserChangeForm, ServiceUserCreationForm +from .models import ( + User, + ServiceUser, + School, + ListRight, + ListShell, + Adherent, + Club, + Ban, + Whitelist, + Request, + LdapUser, + LdapServiceUser, + LdapServiceUserGroup, + LdapUserGroup +) +from .forms import ( + UserChangeForm, + UserCreationForm, + ServiceUserChangeForm, + ServiceUserCreationForm +) class UserAdmin(admin.ModelAdmin): @@ -195,6 +212,8 @@ class ServiceUserAdmin(VersionAdmin, BaseUserAdmin): admin.site.register(User, UserAdmin) +admin.site.register(Adherent, UserAdmin) +admin.site.register(Club, UserAdmin) admin.site.register(ServiceUser, ServiceUserAdmin) admin.site.register(LdapUser, LdapUserAdmin) admin.site.register(LdapUserGroup, LdapUserGroupAdmin)