{{extend 'layout.html'}} {{try:}}{{=uplink}}{{except:}}{{pass}}

{{if request.function=='state':}} Internal state {{else:}} {{if len(request.args)>1:}} database {{=A(request.args[0],_href=URL(r=request,f='index/'))}} table {{=A(request.args[1],_href=URL(r=request,f='select/%s/%s'% tuple(request.args[:2])))}} {{if len(request.args)>2:}} record id {{=A(request.args[2],_href=URL(r=request,f='update/%s/%s/%s'% tuple(request.args[:3])))}} {{pass}} {{=request.function}} {{else:}} Avalilable databases and tables {{pass}} {{pass}}

{{if request.function=='index':}} {{if len(dbs)==0:}}No databases in this application{{pass}} {{for dbname,items in dbs.items():}} {{for dt in items:}}

{{=A("%s.%s"%dt,_href=URL(r=request,f='select/%s/%s'%dt))}}

[ {{=A('insert new records',_href=URL(r=request,f='insert/%s/%s'%dt))}} ]

{{pass}} {{pass}} {{pass}} {{if request.function=='select' and len(request.args)>1:}} [ {{=A('insert new records',_href=URL(r=request,f='insert/%s/%s'%tuple(request.args[:2])))}} ]

Rows in table


{{=FORM('SQL FILTER: ',INPUT(_type='text',_value=query,_name='query'),INPUT(_type='submit',_value='apply'))}}
(A condition like "table1.field1=table2.field2" results in a SQL JOIN. Use AND, OR and (...) to build more complex filters)

{{if start>0:}}[ {{=A('previous 100 records',_href=URL(r=request,f='select/%s?query=%s&start=%s'%('/'.join(request.args),query,start-100)))}} ]{{pass}} {{if nrecords==100:}}[ {{=A('next 100 records',_href=URL(r=request,f='select/%s?query=%s&start=%s'%('/'.join(request.args),query,start+100)))}} ]{{pass}} {{=records}} {{pass}} {{if request.function=='insert' and len(request.args)>1:}}

New Record


{{=form}} {{pass}} {{if request.function=='update' and len(request.args)>2:}}

Edit current record



{{=form}} {{pass}} {{if request.function=='state':}}

Current request

{{=BEAUTIFY(request)}}

Current response

{{=BEAUTIFY(response)}}

Current session

{{=BEAUTIFY(session)}} {{pass}}