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

Flask 的 debug 模式不能开启。

  •  
  •   FireCat · Dec 6, 2015 · 4462 views
    This topic created in 3800 days ago, the information mentioned may be changed or developed.

    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()
    ```

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2331 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 01:37 · PVG 09:37 · LAX 18:37 · JFK 21:37
    ♥ Do have faith in what you're doing.