如何运行rauth / flask示例?

时间:2013-06-25 01:08:41

标签: python flask rauth

我试图运行这个例子:

https://github.com/litl/rauth/blob/master/examples/facebook/facebook.py

所以我从命令行运行这个例子,输出说:

* Running on http://127.0.0.1:5000/
* Restarting with reloader

并且程序在前台运行。现在我想让我们看看在浏览器中输入网址时会发生什么:

http://127.0.0.1:5000/

它显示:

jinja2.exceptions.TemplateNotFound

所以我想让我们仔细看看源代码,这就是我发现的:

Please note: you must do `from facebook import db; db.create_all()` from
the interpreter before running this example!
Due to Facebook's stringent domain validation, requests using this app
must originate from 127.0.0.1:5000.

所以我想可能是我必须从python shell运行它。所以我在python shell中输入命令:

from facebook import db; db.create_all()

现在我收到错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named facebook

所以我想可能是我应该安装facebook。所以我安装它:

pip install facebook

这是成功的。那么我再从python shell运行命令:

from facebook import db; db.create_all()

现在我收到错误:

Downloading/unpacking facebook.db
  Could not find any downloads that satisfy the requirement facebook.db
No distributions at all found for facebook.db

现在怎样?我被卡住了。请帮助别人。

由于

0 个答案:

没有答案