That post wasn't clear, my bad. Again: t=request.GET['city'] c=request.GET['category'] s=request.GET['status'] properties = Property.objects.filter( Q(city=t) | Q (category=c ) | Q(status=s) ) #example filter
On the website I've implemented search engine with 3 <select> lists. CITY,CATEGORY and STATUS Every list has added: <option value=0 ...> Select All </option> So user may chose all properties in CITY, or only HOUSES in CITY, only HOUSES in all cities or any other combination How to create filter reading ONLY selected values, without "value=0" ? In fact, there's more <select> lists and creatiing IF statements for all of them (with separate filters) might take ages. -- 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.