Closed esclkm closed 6 years ago
If i save my mapper in directory [app_config]\tenants\mapper - class Mapper
and in settings MULTITENANT_MAPPER_CLASS = '[app_config].tenants.mapper.Mapper'
I will have an error
"Could not import mapper:..." - utils.py line 71
may be you need to replace try constuction?
try: module_path, member_name = name.rsplit(".", 1) module = import_module(module_path) cls = getattr(module, member_name)
to
try: from pydoc import locate cls = locate(name)
I don't want to depend on pydoc. Maybe an issue without Python env (pip install . of your app), take care to provide the full Python path to the module.
pip install .
If i save my mapper in directory [app_config]\tenants\mapper - class Mapper
and in settings MULTITENANT_MAPPER_CLASS = '[app_config].tenants.mapper.Mapper'
I will have an error
"Could not import mapper:..." - utils.py line 71
may be you need to replace try constuction?
to