> is there a way to get SQLObject to arbitrarily sort the returned values?

The short answer is yes.  You can use SQLBuilder, or mess with the
queries directly through the SQLObject internals.

However, do you really need SQLObject to sort the records for you?
It's much easier to sort them yourself in python like so:
tasks = Task.select()
def compare_tasks(a,b):
    order = dict(do_it_now=1, when_you_wanna=2, not_really_important=3)
    a_order = order[a.priority]
    b_order = order[b.priority]
    return cmp(a_order, b_order)
tasks.sort(compare_tasks)

once this is run, tasks will be sorted according to your scheme!

hope this helps, -Ian


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to