add an example for search_fields in admin interface
[matthijs/upstream/django-ldapdb.git] / examples / admin.py
index 29fde3eaadf7da729020d18f92f2da68962fc834..8948bbc867930f3f9a90927116916af9055133a0 100644 (file)
@@ -26,6 +26,7 @@ class LdapGroupAdmin(admin.ModelAdmin):
 
 class LdapUserAdmin(admin.ModelAdmin):
     exclude = ['dn', 'password', 'photo']
+    search_fields = ['first_name', 'last_name', 'full_name', 'username']
 
 admin.site.register(LdapGroup, LdapGroupAdmin)
 admin.site.register(LdapUser, LdapUserAdmin)