V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
CoooolChan
V2EX  ›  问与答

我在sae上写了个简单的flask程序,为什么用render_template呈现html的时候老是500错误?

  •  
  •   CoooolChan · Jun 4, 2013 · 4026 views
    This topic created in 4722 days ago, the information mentioned may be changed or developed.
    6 replies    1970-01-01 08:00:00 +08:00
    julyclyde
        1
    julyclyde  
       Jun 4, 2013 via iPad
    去sae控制台看日志
    huiyubird
        2
    huiyubird  
       Jun 4, 2013
    贴个代码啥的看看呗,是不是木有return render_html这样?
    CoooolChan
        3
    CoooolChan  
    OP
       Jun 4, 2013
    @julyclyde
    @huiyubird
    代码
    import sae
    from flask import Flask, render_template


    app = Flask(__name__)

    @app.route('/')
    def index():
    return render_template('x.html')


    application = sae.create_wsgi_app(app),没有修改过config.yaml
    日志信息看不懂
    1.coolhunter.sinaapp.com GET HTTP/1.0 "http://sae.sina.com.cn/?m=vermng&app_id=coolhunter&ver=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36" yq30
    CoooolChan
        5
    CoooolChan  
    OP
       Jun 4, 2013
    @julyclyde 这个文档我弄不明白,我有照着yaml配置文件改过不起作用
    julyclyde
        6
    julyclyde  
       Jun 5, 2013
    文档里讲的是怎么看日志,不是讲怎么配YAML
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2777 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 15:34 · PVG 23:34 · LAX 08:34 · JFK 11:34
    ♥ Do have faith in what you're doing.