Skip to content Skip to sidebar Skip to footer

Modulenotfounderror: No Module Named 'posts' In Django

when i run python manage.py makemigrations,no module error found occur, plz help me settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'djan

Solution 1:

Inside INSTALLED_APPS you should declare your posts like that: 'posts.apps.PostsConfig' To understand why, take a look at file apps.py from your project folder; it should look like that:

from django.apps import AppConfig


classPostsConfig(AppConfig):
    name = 'posts'

Solution 2:

I had the same issue, you need a comma (,) after 'posts'

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'posts',
]

Post a Comment for "Modulenotfounderror: No Module Named 'posts' In Django"