navoj
navoj

Reputation: 1

Importing the views from my app in the project

So im just starting with Django framework and i cannot explain myself why i can't import the views from my app, im watching one course online and im doing the exact same thing but it won't work, anyone help?Here is screenshot

Upvotes: 0

Views: 43

Answers (1)

Ghostetr
Ghostetr

Reputation: 35

First of mark the folder as a sources root in pycharm, so you get the correct indexing when trying to import it.

Next up make sure that polls is listed in INSTALLED_APPS

When developing with python, it's better practice to be explicit rather than implicit, it "might" be better to correct your import to this: from polls.view import viewname

Upvotes: 2

Related Questions