I am running a web application that return hello world to a web browser using python. The code is as follows:
Code:
from flask import Flask app = Flask(__name__) @app.route("/") def index(): return "Hello World!"
after this i am using the command flask run to run the application.py file
Which is working fine on browser. but now if i reset the code again on application.py file to return "Hello world! hello again" and reload the website port the results are not affected in the browser It still returns "Hello World!"
set this in terminal
export FLASK_ENV=development
or if this not work then try to open URL in other browser
export FLASK_DEBUG=1 //Linux or Mac:
set FLASK_DEBUG=1 //windows
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.