Hi,

First of all, thanks to both of you.

Mmm... even if Olive's answer works, it's indeed, as he say, not very
pythonic nor very django-like.

On the other hand, I would not be very concerned about the fact that
the developper must know the underlying database tablenames, as this
already happen with other commands as the get() or the filter(). In
deed, you can find in those commands arguments like
table1__table2__name__exact.

I'll follow this thread with interest anyway.

Thanks again for your answers.

G

On 6/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> Hi Guillermo,
>
> On Tue, 2006-05-30 at 18:42 +0200, Guillermo Fernandez Castellanos
> wrote:
> > Hi,
> >
> > I've been reading the documentation about order_by(). They say, amont
> > others, that:
> > """
> > 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')
> > """
> >
> > Unfortunately, I do not quite get the example, and I've not been able
> > to make the concept work with one of my django applications.
> >
> > Could someone please extend a bit the notion, or point me to some example?
>
> Slightly late to the party here, but...
>
> This came up on IRC yesterday and a bunch of people helpfully provided
> the necessary clues to confirm how it was behaving for a bunch of
> examples. It is more or less broken at the moment.
>
> There is a ticket to fix it here --
> http://code.djangoproject.com/ticket/2076 .
>
> I'm wondering if we should take the opportunity to fix the API for the
> call at the same time, since requiring the developer to know the
> underlying database tablename is a little abnormal for Django (and it
> taxes my tiny brain, so I would have to look it up each time). There
> should be a thread about that on the developer's list shortly if you
> want to contribute or observe.
>
> Regards,
> Malcolm
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to