1
votes

Finished creating the models file, typed python manage.py makemigrations main and I get a reply back, 'no installed app with label 'main'. when I do python manage.py migrate, it says Apply all migrations: admin, auth, contenttypes, sessions. I even spent considerable time double checking my spelling and it is correct. Any ideas on how I can fix it?

2
share the INSTALLED_APPS setting. - Willem Van Onsem
i add that but didnt work - none

2 Answers

1
votes

your app.py must look like this:

from django.apps import AppConfig

class MainConfig(AppConfig):
    name = 'main'
    verbose_name = 'Some Name'
0
votes

You need to add your app main to the INSTALLED_APPS setting [Django-doc] in the settings.py:

# settings.py

INSTALLED_APPS = [
    # …,
    'main'
]