【发布时间】:2013-12-18 02:09:15
【问题描述】:
我正在开发一个简单的烧瓶应用程序(我的网站),但无论出于何种原因,路由都不起作用。它只会出现'/' - 没有别的。但是,当我使用嵌入式调试服务器时,它都可以很好地到达它需要去的地方。
我已按照this 教程进行操作。任何帮助是极大的赞赏。
查看.py
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
@app.route('/index')
def index():
return render_template("index.html", title='Site Title')
@app.route('/software/')
def software():
return "LALALA"
if __name__ == '__main__':
app.run()
run.wsgi
import sys
sys.path.insert(0,'/home/www/flaskweb')
from web import web as application
【问题讨论】:
-
“它只会出现'/'”是什么意思?如果在地址栏中输入“/software/”会发生什么?
-
你使用 apache + mod_wsgi 吗?你的“run.wsgi”是做什么用的?