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 trial

Python

Kyung Jeon
Kyung Jeon
5,465 Points

Model class in flask

I just had a question about the Model class, which the User class (which we create) inherits. is the Model class built-in to python automatically? if not, where is the Model class being imported from?

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

Are you also importing using:

from peewee import *

It is being imported by the "*"

This could be explicitly imported using:

from peewee import Model
Kyung Jeon
Kyung Jeon
5,465 Points

Thank you, I overlooked the fact that the entire peewee library is imported, which includes the model class. I really appreciate your help!