my development environment is the vagrant virtual machine under linux. I configured the environment using flask+gunicorn+supervisor+nginx and successfully output "hello world", below is my directory
where microblog is my project name, and app is a (and now only one) application;flask is my virtualenv.
_ _ init__.py
from flask import Flask
app = Flask(__name__)
from app import views
run.py
-sharp!flask/bin/python
from app import app
from werkzeug.contrib.fixers import ProxyFix
from datetime import timedelta
app.config["DEBUG"] = True
app.config["SEND_FILE_MAX_AGE_DEFAULT"] = timedelta(seconds = 1)
app.config["PERMANENT_SESSION_LIFETIME"] = timedelta(seconds=1)
if __name__ == "__main__":
app.wsgi_app = ProxyFix(app.wsgi_app)
app.run()
views.py
from app import app
@app.route("/")
@app.route("/index")
def index():
return "Hello world!"
everything is fine here. But when I put return "hello worldview" Change to other times when the browser output is still hello world. It won"t change until I restart the process through supervisor.
I don"t know where the reason is, please give me your advice aloud!