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].
For more options, visit https://groups.google.com/groups/opt_out.