[Django]-Django unittest in Docker container : ModuleNotFoundError: No module named 'code.x'; 'code' is not a package

6👍

Answering my own question as I have FINALLY found the cause of all my troubles …

I had created an __init__.py file at the root of my project to define a project version as a constant..

After reading here and there about Django modules and namespaces, I removed the __init__.py from my root directory and that solved the problem.

**edited my question above to show the file in question

👤Silver

Leave a comment