2016-12-28 7 views
0

django-contact-formを使用しようとしているときに、次のエラーが発生しました。 私は、セットアップ電子メールを、テンプレートを作成し、pipを使用してそれをインストールしurl(r'^contact/', include('contact_form.urls'))を書き、次のエラーを得た:django-contact-formサイトモデルエラー

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

どのdjangoのバージョンを使用していますか? – ettanany

答えて

1

はあなたsetting.pyファイルにINSTALLED_APPS'django.contrib.sites'を追加する必要があると思われます。チェックEnabling the sites framework

+0

それは働いた!どうもありがとう。 –