Having trouble building a search form with proper filters

1 view
Skip to first unread message

jlwlynn

unread,
Dec 18, 2009, 2:36:59 PM12/18/09
to Django users
Okay, Here's a quick look at my model layout

Contact :
company -> ForeignKey -> Company

Company :
type --> OneToOne --> Type

Type :
type (character)

I'm trying to build a search that will return contacts based on
certain criteria. Any other fields in Company that do not join to
another table work just fine (e.g. company__city__icontains=city).
But, any way I've tried to filter based on the type (e.g.
company__type__type__icontans=type) results in failure. (I've tried
all I can think of, but cannot find a solution). Failure (in this
case) is :

Join on field 'type' not permitted.

Any ideas would be greatly appreciated!!!

Thanks,

jason

Reply all
Reply to author
Forward
0 new messages