2017-03-12 13 views

答えて

0

は、すべてのDjangoのアプリはジャンゴでそう 書き込みが

シェル、実行する Siteを必要
$> ./manage.py shell 
>>> from django.contrib.sites.models import Site 
>>> site = Site() 
>>> site.domain = 'example.com' 
>>> site.name = 'example.com' 
>>> site.save() 
[存在しないサイトのマッチングクエリ]の
+0

シェルの作成後に新しいエラーが発生しました。 – esnaf96

+0

エラー:「重複するキー値が一意性制約に違反しています」 – esnaf96

+0

http://stackoverflow.com/questions/11089850/integrityerror-duplicate-key-value-violates-unique-constraint-django-postgres http://stackoverflow.com/questions/34695323/django-db-utils-integrityerror-duplicate-key-value-violates-unique-constraint http://stackoverflow.com/questions/28615208/duplicate-key-value-violates-unique-constraint-while-saving-これらのリンクはあなたを助けるかもしれないmodelform –

関連する問題