This is the db tables HTML table: response.toolbar()[9][0][0], and this is 
the db stats table: response.toolbar()[10][0][0]. So, you can insert just 
the HTML for those tables without bothering with the buttons and Javascript.

Anthony

On Tuesday, March 12, 2013 7:08:38 AM UTC-4, Ricardo Pedroso wrote:
>
> On Tue, Mar 12, 2013 at 3:37 AM, Anthony <[email protected] <javascript:>> 
> wrote: 
> > 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. 
>
> Thanks, I didn't knew that response.toolbar differentiated lazy tables. 
> I will take a look. 
>
> I don't use response.toolbar mainly because 
> I work a lot without javascript enabled (times to times I like use the 
> netsurf browser (http://www.netsurf-browser.org/) - just for curiosity, 
> not a requirement - and it doesn't have javascript, they are in their 
> way to add it. 
>
> Ricardo 
>
> > 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]> 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] <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 

--- 
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.


Reply via email to