【发布时间】:2013-04-09 10:55:24
【问题描述】:
我已经安装了Flask-Restless 并尝试运行quickstart app。所有请求都返回 404 错误(在 python 日志和 curl 响应中)。我的整个设置是:
$ virtualenv venv --distribute
$ source venv/bin/activate
$ pip install flask-restless
$ pip install flask-sqlalchemy # it doesn't appear to do this automatically
... Copy code from quickstart to "run.py" ...
$ python ./run.py
(another window)
$ curl -i http://127.0.0.1:5000/
run.py 的控制台输出是:
* Running on http://127.0.0.1:5000/
* Restarting with reloader
127.0.0.1 - - [16/Apr/2013 17:08:05] "GET / HTTP/1.1" 404 -
确实创建了test.db,使用调试器我可以看到app.run() 确实执行了。
有趣的是,我得到与Eve 完全相同的行为。不过,我可以运行简单的 Flask 应用程序。
如果重要的话,这是 OS X 10.8 和 Python 2.7.3。
【问题讨论】:
标签: flask flask-restless