On Sun, Jun 29, 2008 at 9:50 PM, MilesTogoe <[EMAIL PROTECTED]> wrote:
>
> assuming webpy .3 with no ORM - what is the best way to handle a tree of
> data in templator ?
> ie users => many emails => many maillists
>
> with ORM I would do something like
> $for u in users:
>    <h1> $u </h1>
>    $for e in u.emails:
>        <h2> $e </h2>
>        $for m in e.maillists:
>              <h3> $m </h3>

Nothing is stopping you from using some ORM with web.py if that makes
your job easy.

For a simple case like this, I'll probably define functions.

get_emails(user)
get_maillists(email)

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

Reply via email to