I have a circular import problem:
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 96, in load_app
models = import_module('.models', app_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/......../account/models.py", line 11, in <module>
from account import model_managers as model_mgrs
File "/Users/......../account/model_managers.py", line 6, in <module>
from account import models as account_models
ImportError: cannot import name models
I followed this guy's recommendation to deal with circular imports by only importing the module: https://stackoverflow.com/a/3956038/1724763
But I still got an error. What now?
UPDATED
OK, I solved the problem by doing in account/model_managers.py:
import importlib
account_models = importlib.import_module('.models', 'account')
Although it does look unwieldy. Not sure whether it is pythonic...