def toolbar(self):
        from html import DIV, SCRIPT, BEAUTIFY, TAG, URL, A
        BUTTON = TAG.button
        admin = URL("admin", "default", "design", extension='html',
                    args=current.request.application)
        from gluon.dal import DAL
        dbstats = []
        dbtables = {}
        infos = DAL.get_instances()
        for k,v in infos.iteritems():
            dbstats.append(TABLE(*[TR(PRE(row[0]),'%.2fms' %
                                          (row[1]*1000))
                                           for row in v['dbstats']]))
            dbtables[k] = dict(defined=v['dbtables']['defined'] or '[no defined tables]',
                               lazy=v['dbtables']['lazy'] or '[no lazy tables]')
        u = web2py_uuid()
        backtotop = A('Back to top', _href="#totop-%s" % u)
        # Convert lazy request.vars from property to Storage so they
        # will be displayed in the toolbar.
        request = copy.copy(current.request)
        request.update(vars=current.request.vars,
            get_vars=current.request.get_vars,
            post_vars=current.request.post_vars)
        return DIV(
            BUTTON('design', _onclick="document.location='%s'" % admin),
            BUTTON('request',
                   _onclick="jQuery('#request-%s').slideToggle()" % u),
            BUTTON('response',
                   _onclick=u % "jQuery('#response-%s').slideToggle()"),
            BUTTON('session',
                   _onclick="jQuery('#session-%s').slideToggle()" % u),
            BUTTON('db tables',
                   _onclick="jQuery('#db-tables-%s').slideToggle()" % u),
            BUTTON('db stats',
                   _onclick="jQuery('#db-stats-%s').slideToggle()" % u),
            DIV(BEAUTIFY(request), backtotop,
                _class="hidden", _id="request-%s" % u),
            DIV(BEAUTIFY(current.session), backtotop,
                _class="hidden", _id="session-%s" % u),
            DIV(BEAUTIFY(current.response), backtotop,
                _class="hidden", _id="response-%s" % u),
            DIV(BEAUTIFY(dbtables), backtotop, _class="hidden",
                _id="db-tables-%s" % u),
            DIV(BEAUTIFY(
                dbstats), backtotop, _class="hidden", _id="db-stats-%s" % u),
            SCRIPT("jQuery('.hidden').hide()"), _id="totop-%s" % u
        )
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/globals.py/Response.toolbar/swapped operands of `%`