Hi,

> "locations_location" is really missing in FROM-clause entry... why?

Drop in to "manage.py shell", and try a query set with the ordering
"locations_location.id". Does that work? If not, add a
select_related() to your query set. Does that work? If not, verify
that the Location table is in an app called locations (in other words,
the table name is really locations_location in your DB and not
somethingelse_location.)

> How can I get ordering I need?

If you just need ordering by location.id, you don't need Django to
join in the location table at all.

Just change this:
ordering = ['locations_location.id', 'parent', 'id']

to this:
ordering = ['location', 'parent', 'id']

-Rajesh

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