2014-10-02 87 views
1

我發現flask-jquery-ajax-example,我試圖用最新的庫版本運行它:無模塊命名flask.ext.wtf.SelectField

$ pip install flask flask-wtf wtforms 
$ pip install -e ./ 

但是,我得到了導入錯誤:沒有模塊名爲flask.ext。 wtf.SelectField同時啓動腳本:

$ python bin/runserver.py 
Traceback (most recent call last): 
    File "bin/runserver.py", line 2, in <module>                                                         
from fjae import run_dev_server                                                           
    File "/home/mic/tmp/flask-jquery-ajax-example/fjae/__init__.py", line 3, in <module>                                             
from fjae import views                                                              
    File "/home/mic/tmp/flask-jquery-ajax-example/fjae/views.py", line 6, in <module>                                              
from fjae.forms import VehicleForm                                                           
    File "/home/mic/tmp/flask-jquery-ajax-example/fjae/forms.py", line 1, in <module>                                              
from flask.ext.wtf import Form, SelectField                                                        
    File "/home/mic/.virtualenvs/unisnp/lib/python2.7/site-packages/flask/exthook.py", line 87, in load_module                                        
raise ImportError('No module named %s' % fullname)                                                       
ImportError: No module named flask.ext.wtf.SelectField 

難道SelectField被新的方法取代?

回答