[Fixed]-Django ModuleNotFoundError

9👍

It looks like your entries directory is in the wrong place. You should move it up one level, so it’s app/entries instead of app/app/entries.

(You are correct that ‘entries.apps.EntriesConfig’ is a valid way to add to INSTALLED_APPS.)

5👍

you should add the app in INSTALLED_APPS like so: 'app.entries'

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'app.entries',
    'rest_framework', ]

4👍

if you started a project using django-admin startproject <project's name> on terminal, then try not to change PROJECT_DIR and BASE_DIR. They should be same.

0👍

In your case the INSTALLED_APPS should be
INSTALLED_APPS = [
‘rest_framework’,
‘app.entries.apps.EntriesConfig’,
…….
]

Also in entries/apps.py file in fEntriesConfig() set
name = ‘app.entries’

0👍

In my case it was the simplest mistake, which is often the hardest to see:
I missed the comma separation between the new app I wanted to add in the INSTALLED_APPS.
Dont be me, double check your spelling.

👤Pfinnn

0👍

I had a similar error and I resolved that by moving the Django app folder into the Django project directory before I was able to run python manage.py runserver with no errors.

-3👍

its seems to be error which i faced during this django jounrney
you have to do here manage.py and firstproject whatever the name at the same direcotry then add new “fist_App” in the setting.py at installed_App list then
check the python manage.py fristapp

Leave a comment