# Example from django.db import models class ParkingLot(models.Model): lot_number = models.IntegerField() is_reserved = models.BooleanField()
I'm interested in Odd xor Even
lot_number. What's the recommended way to filter that in Django?
I've posted some answer below.
Does anyone know if we can use a direct comparison something like
F('lot_number') % 2 == 0 technique?