V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
FireCat
V2EX  ›  问与答

Flask 的 debug 模式不能开启。

  •  
  •   FireCat · 2015-12-06 21:07:50 +08:00 · 3939 次点击
    这是一个创建于 3057 天前的主题,其中的信息可能已经有所发展或是发生改变。

    uwsgi 运行的 flask 。
    debug 已经开了可是并没起作用。
    ```
    from flask import Flask
    app = Flask(name)

    app.debug = True
    app.host = '127.0.0.1'
    app.port = 8000
    @app.route("/")
    def hello():
    return "Hadsda!"

    @app.route("/u/<username>")

    def showusername(username):
    return "User %s!" % username;
    '''
    @app.route("/<int:post_id>")
    return "Post %s" % post_id;
    '''
    if __name
    _ == "main":
    #app.run(host='127.0.0.1', port=8080)
    app.run()
    ```

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2573 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:31 · PVG 09:31 · LAX 18:31 · JFK 21:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.