No form, I have customized the layout.html file, but nothing that uses
session or forms.
Here is the controller:
def index():
"""
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html
"""
response.flash = T('You are successfully running web2py.')
return dict(message=T('Hello World'))
And here is the view:
{{left_sidebar_enabled=right_sidebar_enabled=False}}
{{extend 'layout.html'}}
{{if 'message' in globals():}}
<h1>{{=message}}</h1>
<hr />
<h2>Readme</h2>
<ul>
<li>{{=T('You are successfully running web2py')}}</li>
<li>{{=T('This is a copy of the scaffolding application')}}</li>
<li>{{=T('You can modify this application and adapt it to your
needs')}}</li>
<li>{{=A(B(T("click here for the administrative interface")),
_href=URL('admin','default','index'))}}</li>
<li>{{=A(T("click here for online examples"),
_href=URL('examples','default','index'))}}</li>
<li><a href="http://web2py.com">web2py.com</a></li>
<li><a href="http://web2py.com/book">{{=T('documentation')}}</a></li>
</ul>
<ol>
<li>{{=T('You visited the url')}}
{{=A(request.env.path_info,_href=request.env.path_info)}}</li>
<li>{{=T('Which called the function')}}
{{=A(request.function+'()',_href='#')}} {{=T('located in the file')}}
{{=A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,_href=URL('admin','default','peek',args=(request.application,'controllers',request.controller+'.py')))}}</li>
<li>{{=T('The output of the file is a dictionary that was rendered by the
view')}}
{{=A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))}}</li>
</ol>
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{block left_sidebar}}New Left Sidebar Content{{end}}
{{block right_sidebar}}New Right Sidebar Content{{end}}
I even tried using the stock welcome application with ab:
ab -n 1000 http://127.0.0.1:8000/welcome
And the average time per request was 73 ms.