In my app, I have a form. Depending of the form, one or many filters could be configured by the user.
In my view, I have for exemple :
query = Test.objects.filter(filter1 = request.post['filter1'], filter2 = request.post['filter2'], filter3 = request.post['filter3'])
So, sometimes filter1, filter2 or filter3 could not exist.
If any filters doesn't exist, I just want to ignore the filter.
I could do a script with many "IF" conditions but may be there is a smart solution ?
Thanks for your help !