Django: Error: Unknown command: 'makemigrations'

前端 未结 7 1664
夕颜
夕颜 2021-02-03 23:06

I am trying to follow the Django tutorial and I faced the following error when I enter python manage.py makemigrations polls

Unknown co         


        
7条回答
  •  无人及你
    2021-02-03 23:28

    In django makemigration added after 1.7 so if you are using older version of Django then you have to change settings.py and add your application in installed app like

    INSTALLED_APPS = (
        'Demo',
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
    )
    

    and then you can run command

    python manage.py syncdb

提交回复
热议问题