我尝试了以下步骤来设置漏斗(https://github.com/hasgeek/funnel):
$ git clone https://github.com/hasgeek/funnel
$ cd funnel/
$ cp instance/settings-sample.py instance/settings.py
$ echo "CACHE_TYPE='simple'" >> instance/development.py
然后我安装了以下内容:
- 烧瓶 0.10.1
- 烧瓶资产 0.7
- 烧瓶邮件 0.6.1
- Flask-SQLAlchemy 1.0
- 烧瓶-WTF 0.8
- 皮茨2012d
- unicodecsv 0.9.4
- 日历 3.4
- wtforms-html5 0.1.3
- 蒸馏器 0.6.3
- 烧瓶迁移 1.2.0
- 烧瓶蒸馏器 0.1
最新的软件包来自:
- https://github.com/hasgeek/coaster.git
- https://github.com/hasgeek/flask-lastuser.git
- https://github.com/hasgeek/baseframe.git
然后我跑了:
$ python manage.py db create
我得到以下输出:
Traceback (most recent call last):
File "manage.py", line 5, in <module>
from funnel import app, models, init_for
File "/home/safiyat/Desktop/PyDev/funnel/funnel-master/funnel/__init__.py", line 35, in <module>
from . import models, forms, views
File "/home/safiyat/Desktop/PyDev/funnel/funnel-master/funnel/forms/__init__.py", line 3, in <module>
from .comment import *
File "/home/safiyat/Desktop/PyDev/funnel/funnel-master/funnel/forms/comment.py", line 6, in <module>
import wtforms.fields.html5
ImportError: No module named html5
我在某处读到 html5 小部件和字段自 1.0.5 以来内置于 wtforms,并且它们应该从 wtforms 本身导入。虽然我安装的 wtforms 是 1.0.2,但我仍然收到该错误。为什么?有什么解决办法吗?