diff --git a/django/utils/module_loading.py b/django/utils/module_loading.py index 4b76f6cbdd..26a7e51e0d 100644 --- a/django/utils/module_loading.py +++ b/django/utils/module_loading.py @@ -12,7 +12,7 @@ def module_has_submodule(package, module_name): except KeyError: pass for finder in sys.meta_path: - if finder.find_module(name, package): + if finder.find_module(name, package.__path__): return True for entry in package.__path__: # No __path__, then not a package. try: