On 2/27/07, tml <[EMAIL PROTECTED]> wrote: > > Hey, > > I'm curious what the best practice is for passing data fetched from db > into a kid template. > > I'm doing a fetchall() on the resultset gotten from a SA select, and > passing the resulting python list to kid to iterate and display items. > Would the better and efficient way be to just send the result set into > kid and ask it to iterate over fetchone() ? > I like the first one because the python list is more natural for kid, than a result set. Also it's less information being pass to the kid template which will make both the compilation and resulting py file smaller.
Also the first approach is more close to MVC then the second one. if your really concern about efficiency the best will be to code it both ways and benchmark it. > thanks. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

