http://www.web2py.com/init/default/download
python web2py.py -a 'password' -i 127.0.0.1 -p 8000
python web2py.py -S appName
appName / views / default / index.html etc. are created
def index():
return "Hello,World!"
If you start the server and check it, it is certainly done (URI is ... / index)
def index():
return dict(message="Hello!")
<body>
{{for i in range(3):}}
{{=message}}<br/> <!-- {{=value}}でvalueをHTMLに出力 -->
{{pass}} <!--The dictionary element passed by the controller function can be used as a variable-->
</body>
Recommended Posts