I have the following folder structure in python:
houses/
models.py
__init__.py
view/
houses.py
events.py
__init__.py
At the file events.py I have the following line:
from houses.models import House
Which results me in the following error
No module named models
I’m pretty much sure it’s searching at houses.py file, while what I want is that he searches on the folder houses for the file models.py. How can I tell python to do this? Thanks in advance!
As per the python documentation about intra-package references, you can use a relative import