> I tried
>
> search_fields = ['school__lawyer']
>
> but I get an error message when I did a search for last name of
> lawyer:
>
> Related Field has invalid lookup: icontains

You need something like:

search_fields = ['school__lawyer_last']

to specify which field on the related 'lawyer' instance you want to
search. You can add others like:

search_fields = ['school__lawyer_last', 'school__lawyer_first']

Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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