Getting Site Matching Query Does Not Exist Error after creating django admin

后端 未结 12 2141
后悔当初
后悔当初 2020-12-07 15:05

I\'m going through the standard Django tutorial to create an admin for an app. After commenting the admin related stuff in settings and running syncdb I\'m getting this mess

12条回答
  •  孤街浪徒
    2020-12-07 15:31

    Sometimes if you add more Sites via Admin and delete some of them each site has an ID, it was not working for me once I changed the ID in the DB it started working, so make sure SITE_ID matches the ID in the database.

提交回复
热议问题