admin django plus joli, en 5 ou 6 lignes
[auf-auth-mysql.git] / django / bases / nssauth / admin.py
1 # -*- coding: utf-8 -*-
2
3 from bases.nssauth.models import User, Group
4 from django.contrib import admin
5
6 class UserAdmin(admin.ModelAdmin):
7 fieldsets = [
8 (None, { 'fields': ['username', 'password', 'gecos', 'homedir', 'is_active'] }),
9 ('Groupes', { 'fields': [ 'group' , 'groups'] } ),
10 ('Système', { 'fields': [ 'shell', 'min', 'max', 'inact'], 'classes': ['collapse'] }),
11 ]
12
13 admin.site.register(User, UserAdmin)
14 admin.site.register(Group)
15