Note, response.toolbar() already includes both of these things in the "db tables" and "db stats" buttons. "db tables" even differentiates between lazy tables and tables that have been fully defined so you can see which tables are getting defined for a given request.
Anthony On Monday, March 11, 2013 9:16:17 PM UTC-4, Ricardo Pedroso wrote: > > On Tue, Mar 12, 2013 at 1:00 AM, rh <[email protected] <javascript:>> > wrote: > > I am using {{=response.toolbar()}} at the end of my views while I > > work/test. I was also curious about the globals() dict and so I wrote > > some code to print out globals(). I got carried away a little and > > attempted to recurse that dict and learned that since it's dynamic it's > > not the best idea to attempt to recurse that and unroll it. > > > > So I'm wondering what other tricks you seasoned devs like to use while > > you develop and test with web2py? I'm not having any particular > > problems mostly just looking for other ways to debug/test. > > I like to do this (the first part is sql with timings, the second part is > the > tables that were defined): > > {{ if DEBUG: }} > <pre style="font-size:10px"> > <table class="table table-striped"> > {{ if hasattr(db, '_timings'): }} > {{ for sql, t in db._timings: }} > <tr><td valign="top" nowrap>{{ =t }}</td><td>{{ =sql }}</td></tr> > {{ pass }} > {{ pass }} > </table> > </pre> > > <pre style="font-size:10px"> > <table class="table table-striped"> > {{ for t in db.tables: }} > <tr><td valign="top" nowrap>{{ =t }}</td></tr> > {{ pass }} > </table> > </pre> > > {{ pass }} > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

