On Tue, Jan 12, 2010 at 01:40:50PM -0800, Daniel Roseman wrote:
> On Jan 12, 9:29 pm, Ryan Nowakowski wrote:
> > I have a model that has an IntegerField. I'd like to filter only the
> > even integers. sqlite has a modulus operator so I can do:
> >
> > select * from mytable where my_int = my_in
On Jan 12, 9:29 pm, Ryan Nowakowski wrote:
> I have a model that has an IntegerField. I'd like to filter only the
> even integers. sqlite has a modulus operator so I can do:
>
> select * from mytable where my_int = my_int % 2
Er, that doesn't give you even integers, it gives you rows where
my
I have a model that has an IntegerField. I'd like to filter only the
even integers. sqlite has a modulus operator so I can do:
select * from mytable where my_int = my_int % 2
However, I'd like to use the QuerySet API to do this instead of
resorting to SQL. Any ideas or hints?
Thanks,
Ryan
3 matches
Mail list logo