1π
The problem is manage.py
. If you put django apps inside other packages you should use their fully qualified module name for imports and as a corrolary in INSTALLED_APPS.
It still works if you omit the parent package name, because manage.py temporarily hacks sys.path to import the module that contains the settings module. Then nose does its own import magic and is unable to reproduce the manage.py hack.
Iβd recommend to use django-admin.py instead of manage.py as it does not do any import tricks.
There is no concept of a project in django. Just treat everything as plain python packages and control your PYTHONPATH.
1π
the inspect module is doing probably something hinky.
Python has the builtin function issubclass() for just this occasion!
def inherits_from_animal(some_animal):
return issubclass(some_animal, Animal)
although i dont see why you couldnt just use issubclass wherever you are using inherits_from_animal now π
- [Answered ]-Django settings module and relative paths
- [Answered ]-Drop-down box in Django admin does not auto-populate with choices
- [Answered ]-Getting context of parent in Foreign Key β Django
- [Answered ]-Pip install error: ModuleNotFoundError No module named 'setuptools'