But if I got it correctly I can use Q objects to make complex filters but they only apply to one model, what I need is a combination of the models. And since the search can return more than one (or even zero) objects I can't use get() to see the related objects.
On Thursday, March 15, 2012 9:58:52 PM UTC-3, Shawn Milochik wrote: > > If you don't know which fields your users will be searching on in > advance, you'll have to create Q objects and dynamically build your query > in your view. > > > https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-lookups-with-q-objects > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/P8Jn4YsOabEJ. 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.