Django: Modulenotfounderror: No module named

Asked

Viewed 2,061 times

1

I have the following problem between two apps, in which I call a model from an app (app1) in a view from another app (app2)

Projeto
  ├ APP1
  └ APP2

View from APP2:

from projeto.app1.models import ObjetoX

objeto_x = ObjetoX(parm=1)

In doing so arises the following error:

Modulenotfounderror: No module named 'project.app1'

IDE: Pycharm Operating System: Windows 10

  • the file name is uppercase or minuscule?

  • Rodrigo, I did not change the name of the folders because it is relevant to the answers..

  • Your apps are listed in Settings.py?

1 answer

4


Try the following:

from app1.models import ObjetoX

objeto_x = ObjetoX(parm=1)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.