Re: Shift a QuerySet?

2007-07-25 Thread Russell Keith-Magee
On 7/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Oops, that should read "Cannot resolve keyword 'playlist_aggreation' > into field", even though I am messing with song aggregations and > playlist aggregations :) Apologies - I got tied up in underscores :-) Try:

Re: Shift a QuerySet?

2007-07-25 Thread [EMAIL PROTECTED]
Oops, that should read "Cannot resolve keyword 'playlist_aggreation' into field", even though I am messing with song aggregations and playlist aggregations :) On Jul 24, 11:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks! > > All of your workarounds involving filter didn't work,

Re: Shift a QuerySet?

2007-07-25 Thread [EMAIL PROTECTED]
Thanks! All of your workarounds involving filter didn't work, erroring with "Cannot resolve keyword 'song_aggregation' into field", which makes sense since I really wanted to go the other way around, I think. Anyways, after some munging with 'extra', as per your suggestion, I got it working!

Re: Shift a QuerySet?

2007-07-24 Thread Russell Keith-Magee
On 7/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > An analogous operation would be: > playlist_aggregates = PlaylistAggregation.objects.order_by('-count') > playlists = [p.playlist for p in playlist_aggregates] The query itself looks like it's just a query over Playlist objects where

Re: Shift a QuerySet?

2007-07-24 Thread [EMAIL PROTECTED]
t; wrote: > > > > > Hello, > > > This may sound like a strange inquiry, but is there any way using > > Django's ORM to "shift" a queryset? To explain my question, I'll > > provide an example. > ... > > Now, I want to "shift" my queryset to be a qu

Re: Shift a QuerySet?

2007-07-24 Thread Russell Keith-Magee
On 7/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > This may sound like a strange inquiry, but is there any way using > Django's ORM to "shift" a queryset? To explain my question, I'll > provide an example. ... > Now, I want to "s

Shift a QuerySet?

2007-07-24 Thread [EMAIL PROTECTED]
Hello, This may sound like a strange inquiry, but is there any way using Django's ORM to "shift" a queryset? To explain my question, I'll provide an example. class Playlist(models.Model): title = models.CharField(maxlength=256, null=True, blank=True) user = models.Forei