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 Customizing Django Templates Building Custom Tags DIY Custom Tags

Import from courses.models doesn't resolve.

When I try to import the Course model I'm getting an unresolved reference for 'courses'. I can't seem to find where I should tell python to import the model from!

2 Answers

Looks like the problem was my Pycharm. Somewhere along the line my project was un-marked as the sources root!

Santosh Pillai
Santosh Pillai
3,052 Points

Hi Edward

I'm facing the same issue in pycharm. How did you resolve it ?

You'll want to find the project folder in the left-side document tree and right-click on it. Choose Mark Directory As > Sources Root.