Closed berycz closed 1 year ago
(from our convo on discord)
how about an example in https://docs.iommi.rocks/en/latest/cookbook_queries.html#how-do-i-control-what-q-is-produced
class AlbumsTable(Table): class Meta: auto__model = Album query__form__fields__ninetees = iommi.Field.boolean( display_name=_("the '90s"), ) @staticmethod def query__filters__ninetees__value_to_q(value_string_or_f, **_): if value_string_or_f == "1": return Q(year__gte=1990) & Q(year__lte=1999) return Q()
(I haven't tested it, but should work)
(from our convo on discord)
how about an example in https://docs.iommi.rocks/en/latest/cookbook_queries.html#how-do-i-control-what-q-is-produced
(I haven't tested it, but should work)