尝试使用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.
答案 0 :(得分:1)
似乎您需要在split
文件中将'django.contrib.sites'
添加到INSTALLED_APPS
。查看Enabling the sites framework