Closed mickey06 closed 11 years ago
Did you regenerate the Global Module Cache?
Yes I did.
Hi! It's not working for me either. I already had some problems with flask's way of dealing with extensions in the past. The packages name is flask.ext but the extension files in the site-packages folders are located in site-packages/flaskext ... (flask.ext logically merges these paths together at runtime) I guess Rope gets confused by this layout. I guess the only solution would be to patch Rope to deal with this scenario, which may not be easy.
Julian
Flask uses some magic for import plugins. Import flask plugins like this:
Before:
from flask.ext.cache import Cache
from flask.ext.login import current_user
from flask.ext.mail import Mail
...
After:
from flask_cache import Cache
from flask_login import current_user
from flask_mail import Mail
It's different from Flask docs recommendations, but work with Rope very nice.
PS: For oldest plugins (like flask babel) use this form:
from flaskext.babel import Babel
It's working. Thanks klen.
My project settings contain :+1: { "folders": [ { "path": "/Users/ke/repos/fl-login" } ], "settings": { "rope_autoimport_modules": [ "flask.ext.*" ] } }
My python path is set in config.py to prefs.add('python_path', '/Users/ke/.virtualenvs/flogin/lib/python2.7/site-packages')