On Wed, 2010-08-25 at 21:49 -0700, Joe Z wrote:
> class BookAdmin(admin.ModelAdmin):
>     list_display = ('title', 'author', 'publisher')
>     search_fields = ('first_name', 'last_name')
> 
> Is it possible to add 'publisher' into search_fields so that in admin
> page books showed can be narrow down by a specific publisher? I tried
> it but got the following exception: 

search_fields = ['foreign_key__related_fieldname'] (from the docs)
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to