Django - makemigrations - No changes detected

前端 未结 30 1581
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 04:44

I was trying to create migrations within an existing app using the makemigrations command but it outputs \"No changes detected\".

Usually I create new apps using the

30条回答
  •  情书的邮戳
    2020-12-02 05:27

    INSTALLED_APPS = [

    'blog.apps.BlogConfig',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    

    ]

    make sure 'blog.apps.BlogConfig', (this is included in your settings.py in order to make your app migrations)

    then run python3 manage.py makemigrations blog or your app name

提交回复
热议问题