Computer scienceBackendDjangoAdvanced QuerySet usage

Q object

Nested query

Report a typo

You need to stash a lot of water for future camping. Only Aqua water is good enough; you need a quantity greater than 50. Rearrange the lines to create a valid Python program and make indentations where expected to follow PEP.

Press the right arrow button to make one full indentation and the left arrow button to remove one.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                stores_with_water = Store.objects.filter(products__in=Water.objects.filter(water_filter))
              
                water_filter = Q(brand='Aqua') & Q(quantity__gt=50)
              
                from myapp.models import Water, Store
              
                from django.db.models import Q
              
___

Create a free account to access the full topic