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

Question:

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

Asked By: EdwardBrown

||

Answers:

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.

Answered By: user20223018
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.