编辑identidock.py 如下:
from flask import Flask
app = Flask(__name__)
default_name = 'Joe Bloggs'
@app.route('/')
def mainpage():
name = default_name
header = '<html><head><title>Identidock</title></head><body>'
body = '''<form method="POST">
Hello <input type="text" name="name" value="{}">
<input type="submit" value="submit">
</form>
<p>You look like a:
<img src="/monster/monster.png"/>
'''.format(name)
footer = '</body></html>