Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialannecalija
9,031 PointsDoes this course need an update? "flask.ext." libraries are already deprecated.
>>> from flask.ext.bcrypt import generate_password_hash
__main__:1: ExtDeprecationWarning: Importing flask.ext.bcrypt is deprecated, use flask_bcrypt instead.
>>> from flask.ext.login import UserMixin
__main__:1: ExtDeprecationWarning: Importing flask.ext.login is deprecated, use flask_login instead.
annecalija
9,031 PointsThanks for the feedback Keith!
You're right. It just made me panic at first. Actually, even using the new ones along with how it was done in the course is pretty much the same. Just the changes in the import statements. So I think it's not that big deal anymore.
Aside from this post, maybe I should rate the course as individual so that Treehouse can reflect on these feedback and perform necessary updates (even just in teacher's notes).
Thanks again.
Keith Whatling
17,759 PointsGood for you!, let me know when you post it, I'd really like to read it. :)
2 Answers
Ross Coe
5,061 Pointsthanks this helped from flask_bcrypt import generate_password_hash
Ayman Said
Python Web Development Techdegree Student 14,717 PointsYes, flask.ext.bcrypt
, flask.ext.login
have been deprecated, instead, need to use flask_bcrypt
& flask_login
The course material needs to be updated.
Flask-Bcrypt project has updated the import statement to match with Flask's new form for extension imports.
Keith Whatling
17,759 PointsKeith Whatling
17,759 PointsProbably needs an update, frameworks like Flask are updating all the time. I would say learn to do it the way on the course, then upgrade your code to use the latest version.
It will be a great thing to figure out using the docs etc. It will really help when doing real world projects, and you can let us all know how you got on :)
Its a win win!