Malcolm,
I looked in my db and my table is called plush_collection. However,
I've also tried
styles.order_by('plush_collection.value')
and I still get the same error 'OperationalError: no such column:
plush_collection.value'
On Oct 21, 9:42 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-10-21 at 07:38 -0700, Greg wrote:
> > 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')
>
> No, because the database table isn't called "collection". It'll be
> called something like appname_collection. Have a look in your database
> or at the value of Collection._meta.db_table.
>
> Regards,
> Malcolm
>
> --
> Success always occurs in private and failure in full
> view.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
-~----------~----~----~----~------~----~------~--~---