I am building a web app with this directory structure:
app/
__init__.py
config/
__init__.py
db_config.py
models/
__init__.py
model.py
datasources/
__init__.py
database.py
...
...
Every __init__.py file has
__all__ = ['', '', ...]
in it, listing the .py files that are in the same directory as it. So, app/__init__.py is empty, app/config/__init__.py has
__all__ = ['db_config']
, etc. in app/models/datasources/database.py, I cannot seem to import anything from app/config/db_config.py. I have tried
import app.config.db_config
import config.db_config
from app.config.db_config import *
but none of them has worked. If anyone has any ideas I'd really appreciate hearing them.
Also, I apologize if this is a duplicate question, but I wasn't sure exactly what to search for.