Good point, that's actually kind of embarassing.  I don't actually
expect to be able to use that syntax but I thought it would be
constructive.

Let me try again:
I have a QuerySet of PlaylistAggregation objects.  Each
PlaylistAggregation object is related to one Playlist object.  I want
to change my QuerySet to select only the related Playlist objects.

An analogous operation would be:
playlist_aggregates = PlaylistAggregation.objects.order_by('-count')
playlists = [p.playlist for p in playlist_aggregates]

But there are some significant downsides for doing that...namely, the
playlist_aggregates QuerySet is evaluated (if I want to paginate the
results, use generic views, etc. it becomes much harder).

Thanks for your help,
Eric

On Jul 24, 10:09 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> 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 "shift" my queryset to be a queryset of JUST the
> > related playlist objects:
> > playlists = playlist_aggregates.shift(playlist)
>
> This example doesn't explain anything - it just shows the syntax you
> expect to be able to use. What exactly is "shifting"? What behaviour
> do you expect "shift" to implement?
>
> Yours,
> Russ Magee %-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to