23 lines
465 B
Python
23 lines
465 B
Python
|
from django.contrib import admin
|
||
|
|
||
|
from .models import (
|
||
|
LdapGroup,
|
||
|
LdapUser,
|
||
|
)
|
||
|
|
||
|
|
||
|
class LdapGroupAdmin(admin.ModelAdmin):
|
||
|
exclude = ['dn', 'members']
|
||
|
list_display = ['name', 'gid']
|
||
|
search_fields = ['name']
|
||
|
|
||
|
|
||
|
class LdapUserAdmin(admin.ModelAdmin):
|
||
|
exclude = ['dn', 'password']
|
||
|
list_display = ['username', 'uid']
|
||
|
search_fields = ['username']
|
||
|
|
||
|
|
||
|
admin.site.register(LdapGroup, LdapGroupAdmin)
|
||
|
admin.site.register(LdapUser, LdapUserAdmin)
|