Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Build a Social Network with Flask Making Strong Users The UserMixin From Flask-Login

Chai Chong Teh
Chai Chong Teh
25,709 Points

Just an update reminder on UserMixin importing, not a question

The UserMixin has no longer been included as ext libraries, hence 'from flask.ext.login import UserMixin' should be changed to 'from flask_login import UserMixin' for newer versions.

Note that I am using Python 3.7.2 version under Windows.

Thanks for the update Chai Chong Teh! You saved me from digging to find the change myself!

Thank you!

1 Answer

Hi guys, just a reminder to this helpful comment: if you still have issues even though you did 'from flask_login import UserMixin', try this on terminal:

pip install flask-login