On Monday 01 Feb 2010 4:34:22 pm Dennis Vermeulen wrote:
> > probably - but anyway I do not think django allows functions to be used
> > on the left hand side of filters.
> >
>
> Isn't this possible by using
> player__handicap__handicapindex__range=[0..16] as filter?
>
well, the handicapinde
On Monday 01 Feb 2010 6:26:16 pm Daniel Roseman wrote:
> > as already mentioned, I am doing it - just hoped that maybe there was a
> > shortcut somewhere ...
>
> Maybe you could denormalize a bit, to store the value of
> getcoursehandicap() in the Player model and update it on save. Then
> you can
On Feb 1, 11:29 am, Kenneth Gonsalves wrote:
> On Monday 01 Feb 2010 4:03:26 pm James Bennett wrote:
>
> > On Mon, Feb 1, 2010 at 3:59 AM, Kenneth Gonsalves wrote:
> > > Anyway, player.getcoursehandicap() works - but not within 'filter'
>
> > Why would you expect it to? Python method definitions
On 1-2-2010 10:59, Kenneth Gonsalves wrote:
> On Monday 01 Feb 2010 3:08:57 pm Daniel Roseman wrote:
>
>>> players = Matchentry.objects.filter(player__getcoursehandicap()__in=
>>> [0..16])
>>>
>>> of course this doesnt work - any clue how to do this? or do I fall back
>>> on raw sql?
>>>
On Mon, 2010-02-01 at 04:33 -0600, James Bennett wrote:
> On Mon, Feb 1, 2010 at 3:59 AM, Kenneth Gonsalves wrote:
> > Anyway, player.getcoursehandicap() works - but not within 'filter'
>
> Why would you expect it to? Python method definitions are not legal
> SQL, so you can't pass a Python metho
On Monday 01 Feb 2010 4:03:26 pm James Bennett wrote:
> On Mon, Feb 1, 2010 at 3:59 AM, Kenneth Gonsalves wrote:
> > Anyway, player.getcoursehandicap() works - but not within 'filter'
>
> Why would you expect it to? Python method definitions are not legal
> SQL, so you can't pass a Python method
On Mon, Feb 1, 2010 at 3:59 AM, Kenneth Gonsalves wrote:
> Anyway, player.getcoursehandicap() works - but not within 'filter'
Why would you expect it to? Python method definitions are not legal
SQL, so you can't pass a Python method into a SQL query and expect it
to work. If you want to further f
On Monday 01 Feb 2010 3:08:57 pm Daniel Roseman wrote:
> > players = Matchentry.objects.filter(player__getcoursehandicap()__in=
> > [0..16])
> >
> > of course this doesnt work - any clue how to do this? or do I fall back
> > on raw sql?
>
> This is impossible to answer without knowing what getcour
On Feb 1, 9:28 am, Kenneth Gonsalves wrote:
> hi,
>
> I have a model Player which has a function called getcoursehandicap() defined
> in the model. I need to get all the Players in a Match with course handicap in
> a certain range. The query should look like this:
>
> players = Matchentry.objects.
9 matches
Mail list logo