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 Using Databases in Python Meet Peewee First Queries

Brian Wilkes
Brian Wilkes
4,731 Points

can't figure out the easiest thing lol

can't import this...( i will use this to find out the answer)

1 Answer

Maxwell Newberry
Maxwell Newberry
7,693 Points
from models import Challenge

Not exactly sure where your problem lied but to break this down quickly, notice a few things:

  • 1) from models - we don't include the .py because it assumes that already.
  • 2) Since we already stated where we are getting this part from we simply say import then the class we are imported from the previously stated Python file.

Good luck!