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 trialMartijn Bakker
16,445 Pointsthe question is: Import the Challenge class from models.py. but i cant find in the video where?
I can't find the answer
3 Answers
Bruno Junqueira
31,740 PointsIn most of the Python challenges, the models.py is in the same directory that the code that you are going to work with.
from models import Challenge
So in that case you just need to import it the class Challenge, from models.py file.
Kenneth Love
Treehouse Guest TeacherWe've used this same pattern to import things in many of the Python courses.
Mario Blokland
19,750 PointsHi Martijn Bakker,
the solution should be somwhere in a video before. Also the answer is almost in the question you just have to rephrase it a little bit. It will go something like:
from ... import ...
This is almost the answer. Just put the puzzle togehther and you should pass this exercise pretty quickly. However, I woul recommend you to rewatch some videos and don't try to skip through the videos. If you do, you really won't learn anything like you should especially if you have no prior expercience. GL mate
Andrew Winkler
37,739 PointsAndrew Winkler
37,739 PointsThat make sense. Since you're already in the python shell, you should be able to omit the '.py'