Closed maksad closed 10 years ago
I think this is because the add_template_global
method is new to Flask v0.10.
Can you check what version of Flask you have?
I'll make it more backwards compatible and re-release, but I just want to be sure.
Yes you are right. My version of Flask is 0.9. Probably I have to upgrade it to use Flask-Images. Thank you very much for great package and support :+1:
If you want to upgrade, go for it. I'll make it backwards compatible anyways. I'm not in a position to do it right now, but in a couple hours...
Ok thank you :)
This has been released on PyPI as v2.0.0 (due to a minor backwards incompatible change).
Cheers,
Mike
I am getting this error when trying to initialize Flask-Images. app = Flask( name ) app.secret_key = 'secretkeythatyouneverguess' images = Images(app) Have no idea why. Tried to google it but not any solution for that.
here is the full error statement:
File "./run.py", line 3, in
from app import app
File "/home/proj/app/ init .py", line 15, in
images = Images(app)
File "/home/proj/flask/local/lib/python2.7/site-packages/flask_images.py", line 54, in init
self.init_app(app)
File "/home/proj/flask/local/lib/python2.7/site-packages/flask_images.py", line 70, in init_app
app.add_template_global(resized_img_src)
AttributeError: 'Flask' object has no attribute 'add_template_global'