トリプル初心者の脅威について事前に警告してください - Python の初心者、Python どこでも初めて、フラスコの初心者。
[pythonanywhere-root]/mysite/test01.py
# A very simple Flask Hello World app for you to get started with...
from flask import Flask
from flask import render_template # for templating
#from flask import request # for handling requests eg form post, etc
app = Flask(__name__)
app.debug = True #bshark: turn on debugging, hopefully?
@app.route('/')
#def hello_world():
# return 'Hello from Flask! wheee!!'
def buildOrg():
orgname = 'ACME Inc'
return render_template('index.html', orgname)
そして [pythonanywhere-root]/templates/index.html に
<!doctype html>
<head><title>Test01 App</title></head>
<body>
{% if orgname %}
<h1>Welcome to {{ orgname }} Projects!</h1>
{% else %}
<p>Aw, the orgname wasn't passed in successfully :-(</p>
{% endif %}
</body>
</html>
サイトにアクセスすると、「ハンドルされていない例外」が表示されます:-(少なくとも問題を探し始めるべき場所をデバッガーに吐き出させるにはどうすればよいですか?