I would like to pass one or many GET variables to filter a queryset. I have tried the following code to create a dictionary of the variables and apply the filter, but testing with two variables it appears to only be filtering on the final dictionary variables.
for k,v in mydict.items():
qs = mymodel.objects.filter(**{"%s__contains" % k: v})
Can anyone point me in the right direction as to where I am going wrong?