Doubt in Django | Sololearn: Learn to code for FREE!


Doubt in Django

How does the filter query set work? Like, Room.objects.filter(R_category=room_category,available=True) Room - model name, R_category = charfield in Room model, available = booleanfield in Room model

4/29/2021 7:42:51 AM


1 Answer

New Answer


The query will filter all objects in the 'Room' model, whose 'R_category' field is equal to 'room_category' and 'available' field is set to True. See this: