Malcolm,
The Django documentation states:
To order by a field in a different table, add the other table's name
and a dot, like so:
Entry.objects.order_by('blogs_blog.name', 'headline')
(I'm not sure what the headline attribute is doing)
////////////
Isn't that the same as what I'm doing?
styles.order_by('collection.value')
On Oct 21, 9:21 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-10-21 at 07:15 -0700, Greg wrote:
>
> [...]
>
> > My problem is that I want to be able to order my styles list by the
> > 'value' field from my Collection class. In my code I try to do:
>
> > styles.order_by('collection.value')
>
> > However, I get the error: 'OperationalError: no such column:
> > collection.value'.
>
> > Does anybody know how I can order my styles variable by my 'value'
> > field in my Collection class?
>
> http://groups.google.com/group/django-users/browse_frm/thread/e79a142...
>
> Regards,
> Malcolm
>
> --
> Everything is _not_ based on faith... take my word for
> it.http://www.pointy-stick.com/blog/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---