1👍
Well, it’s just not the same.
When you do from app7.api import rest
, you practically import app7/api/rest/__init__.py
.
(os.path
might be where you know this import style from, and it has special magic to make all that happen.)
I’d simply suggest importing the most specific module, or if you’re absolutely sure you don’t want to do that, do import .urls_api as urls_api
in rest/__init__.py
(but beware of any eventually possible circular import concerns).
👤AKX
Source:stackexchange.com