On Jun 14, 9:03 pm, "Francois (Jersey)" <francois.ches...@googlemail.com> wrote: > Hello I am trying to make a page showing a nested list: > period 1 > subperiod 1 > subperiod 2 > subperiod 3 > period 2 > subperiod 1 > subperiod 2 -CUT- > def show_periods(): > periods=SQLTABLE(db().select(db.period.ALL)) > return dict(periods=periods) ##, subperiods=subperiods)
You won't be able to use SQLTABLE() for this. You'll need something like: for period in periods: <TR>period</TR> subperiods = db(db.subperiod.period=period.id).select() for subperiod in subperiods: <TR>subperiod</TR> etc You can do this in either View or Controller - I mixed syntax for the 2 in my example...just trying to get you started... F --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---