[Fixed]-Django filtering results from database

1👍

Try this:

qs = qs.filter(Q(shows__new_price__gte=100), Q(shows__starts__gte=today), Q(shows__venue__name__icontains='imax') | Q(shows__venue__name__icontains='anga' ) | Q(shows__venue__name__icontains='century-cinemax-junction')

From the django docs:

If you provide multiple Q object arguments to a lookup function, the arguments will be “AND”ed together.

Leave a comment