[Django]-Unable to import class from one app into another in django

5👍

You don’t need to include project name for import.
If you have all the apps in the same level of hierarchy in the project folder, then just call the files by their app.

Just use:

 from app1.class1 import Class1

and

 from app2.anotherClass import Class2

And regarding the error :

'unresolved references app1'

Use your project folder consisting apps as the Source Root then the app will get recognized.

Leave a comment