Django - makemigrations - No changes detected

前端 未结 30 1492
伪装坚强ぢ
伪装坚强ぢ 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:46

    Try registering your model in admin.py, here's an example:- admin.site.register(YourModelHere)

    You can do the following things:- 1. admin.site.register(YourModelHere) # In admin.py 2. Reload the page and try again 3. Hit CTRL-S and save 4. There might be an error, specially check models.py and admin.py 5. Or, at the end of it all just restart the server

提交回复
热议问题