Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Django combining the names of my two apps, and saying no module named that, with a module not found error

I’m new to django and doing my first project, I have just made a second app for my project, and I had thought that I set everything up properly. But when I try to runserver it comes up with: "ModuleNotFoundError: No module named ‘homepagecourses’". My two apps are called homepage and courses respectively.

I tried to add "homepagecourses" into my installed apps in settings but then it just said it couldn’t find "homepagecourseshomepagecourses". My file directory looks like this

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This looks to be an error in your settings.py, I think that you forgot a comma in your installed apps.

My guess is your INSTALLED_APPS looks like this

INSTALLED_APPS = [
    ".....",
    "homepage" <-- forgot a comma
    "courses"

When forgetting a comma in an array, python will append the strings to each other.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading