django-contact-form网站模型错误

时间:2016-12-28 16:46:34

标签: python django django-models django-forms

尝试使用django-contact-form时出现以下错误。 我使用pip安装了它,创建了模板,设置了电子邮件,写了url(r'^contact/', include('contact_form.urls'))并收到以下错误:

Unhandled exception in thread started by <function check_errors.locals>.wrapper at 0x00000000048107B8>
  File "C:\Users\Caio\Documents\Projects\JCC\venv\lib\site-packages\django\db\models\base.py", line 113, in __new__
"INSTALLED_APPS." % (module, name)
RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.    

1 个答案:

答案 0 :(得分:1)

似乎您需要在split文件中将'django.contrib.sites'添加到INSTALLED_APPS。查看Enabling the sites framework