skip to Main Content

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

Answers


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

    # settings.py
    
    INSTALLED_APPS = [
        # …,
        'main'
    ]
    Login or Signup to reply.
  2. your app.py must look like this:

    from django.apps import AppConfig
    
    class MainConfig(AppConfig):
        name = 'main'
        verbose_name = 'Some Name'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search