Django-ldapdb changes: Added models from example. Added admin from example. Updated settings.py.

This commit is contained in:
nikolark committed 2011-09-20 00:52:34 +02:00
1 parent b33e526b42
commit 67c10175d0
1 file changed
+15
+15
View File
@@ -0,0 +1,15 @@
from django.contrib import admin
from main.models import LdapGroup, LdapUser
class LdapGroupAdmin(admin.ModelAdmin):
exclude = ['dn', 'usernames']
list_display = ['name', 'gid']
search_fields = ['name']
class LdapUserAdmin(admin.ModelAdmin):
exclude = ['dn', 'password', 'photo']
list_display = ['username', 'first_name', 'last_name', 'email', 'uid']
search_fields = ['first_name', 'last_name', 'full_name', 'username']
admin.site.register(LdapGroup, LdapGroupAdmin)
admin.site.register(LdapUser, LdapUserAdmin)