I tend to do it in the views but I would make it a rule
On Jul 23, 3:49 pm, Rob <r...@rmdashr.com> wrote: > What is the preferred way you guys do things? > > controller (this covers both examples): > def index(): > rows = db().select(db.Category.ALL) > table = TABLE() > for row in rows: > table.append(TR(row.name, A("Delete", _href=URL(r=request, > f='delete', args=row.id)))) > return dict(table=table, rows=rows) > > view 1: > {{extend 'layout.html'}} > {{=table}} > > ~~ OR ~~ > > view 2: > {{extend 'layout.html'}} > <table> > {{for row in rows:}} > {{=TR(TD(row.name), A("Delete", _href=URL(r=request, f='delete', > args=row.id)))}} > {{pass}} > </table> > > Maybe in this example it doesn't matter? If this is the case, when > does it matter? I'm just trying to get an idea of how everyone builds > their stuff. > > Sorry for asking such basic questions... but I have no one else to > ask! :) > > Thanks, > Rob