I’m working on a django project that serves multiple sites; depending on the site I want to import different functionality from a different module; how do I import a module in Python if I have the name of its package and the module name itself as a string?
I’m working on a django project that serves multiple sites; depending on the site
Share
in Python generally, you can use
__import__builtin function orimpmodule features: