Flask-WTForms can't find WTForms in my project directory


Question

This is my first post on StackOverflow so Hello everyone.

I'm doing blog application to learn Python and Flask and I would like to launch it on Google App Engine. Unfortunately I have small problem with importing WTForms to the application. I'm currently using Flask 0.9, WTForms 1.0.1 and Flask-WTForms 0.8. I've added flaskext_wtf folder to root path of my project but I'm getting error from html5.py file.

File "/Users/lucas/Workspace/blog/flask_wtf/html5.py", line 1, in <module>
from wtforms import TextField
File "/Users/lucas/Workspace/blog/flask/exthook.py", line 86, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named flask.ext.wtf.wtforms

It looks like it tries to find wtforms inside the extension path instead of my project path. How can I inform the html5.py file to look for the wtforms in the root?

Here are sources of my project - https://bitbucket.org/lucas_mendelowski/wblog/src

1
5
9/5/2013 4:48:54 PM

I think your Virtualenv does not have the Flask-WTF module. Write the following command in your command line under virtualenv

pip install Flask-WTF

or you may do this, but it is not recommended.

easy_install Flask-WTF
5
10/14/2014 5:30:44 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon