本文介绍了Django:关系“django_site”不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在运行一个测试django服务器在aws,我只是安装django-userena,当我尝试注册用户点击提交后,我得到以下消息: 关系django_site不存在LINE 1: ...django_site。domain,django_site。nameFROMdjango_si ... 我不太确定这里出了什么问题,我做了一些研究,并添加了'django.contrib.sites' ,解决方案我最近遇到了这个问题(Django 1.8.7),即使在我的设置中, SITE_ID = 1 在任何其他迁移之前手动迁移网站应用程序: ./管理.py迁移站点 ./manage.py migrate I am running a test django server on aws and I just installed django-userena and when I try to signup a user upon clicking submit, I get the following message: relation "django_site" does not exist LINE 1: ..."django_site"."domain", "django_site"."name" FROM "django_si...I am not really sure what went wrong here. I did some researching and added " 'django.contrib.sites'," to my installed apps, but I am still getting the error. I will there is an extra step I am missing. Any suggestions or advice? 解决方案 I recently ran into this issue (Django 1.8.7) even with SITE_ID = 1 in my settings. I had to manually migrate the sites app before any other migrations:./manage.py migrate sites./manage.py migrate 这篇关于Django:关系“django_site”不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 11:48
查看更多