I suppose you can do something like:
Property.objects.filter(
  city=t, Q(category__isnull=True) | Q(category=c), Q
(status__isnull=True) | Q(status=s)
)

On Dec 16, 9:17 am, Osiaq <osiaq.net...@gmail.com> wrote:
> Yes, this one is working properly.
> Actually I can use i.e
>
> properties = Property.objects.filter( Q(city=t) & Q(category=c ) & Q
> (status=s) )
>
> These parameters are working perfect for:
> city='Tokio', category='House', status='For Rent'
>
> But fails for:
> city='Tokio', category null, status null
>
> Similar filters are working on every single property developer
> website, so it must be possible, but how to do it?

--

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