On Monday 04 December 2006 19:35, [EMAIL PROTECTED] wrote:
> Couple of things I'd suggest here:
>
> 1. Don't use a list comprehension in this case.  It's not necessary.
> Pictures.select already returns an iterable SQLResults collection; you
> can iterate over that in your Kid template and save some time.  Just
> do:
>
> pics = Pictures.select(orderBy='shortname')
>
> BTW, orderBy takes a string, not a database column.

It takes both, the latter is especially important when you try and sort after 
a joined object/table.

Diez

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