I have a Django project and the directory is as follows.
There are a Python file named permissions.py
and a module name permissions
.I want to import permissions.helpers
but it raises ImportError
and the error message is cannot import name helpers
.
The first element in sys.path
is the project directory(the parent directory of myapp
) as I expected.I thought Python Interpreter should try to find modules or files from sys.path
but it seems to search in the current module first.Am i wrong and how can i import permissions.helpers
without using absolute_import
?