add an example for search_fields in admin interface
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 24 May 2010 18:09:56 +0000 (18:09 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 24 May 2010 18:09:56 +0000 (18:09 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@875 e071eeec-0327-468d-9b6a-08194a12b294

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)