ピットで記録されたプロジェクトを、行うのは初めてのために(涙.JPG)私は、ジェットコースターのような気分フィールに会いました!!!
エラー1:トピックチェスが表示されず、ロッククライミング、しかしトピック物(1)とトピックオブジェクト(2)
ソリューション:
注:前と後のDEF _ _ _ str_(自己)二つ下線!!!
错误2:oduleNotFoundError: 'django.core.urlresolvers' という名前のないモジュール
ソリューション:
ウィルfrom django.core.urlresolvers import reverse
変更しますfrom django.urls import reverse
エラー3:モデルに定義されたクラスのエントリ(models.Model):
ソリューション:
topic = models.ForeignKey(Topic , on_delete=models.CASCADE)
错误4:learning_logs / urls.py可能出现django.core.exceptions 'APP_NAME設けることなく)(含む名前空間を指定する' を。
ソリューション:
from django.urls import path
from . import views
app_name='learning_logs'
urlpatterns=[
#主页
path('', views.index,name='index'),
#显示所有主题
path('topics/', views.topics, name='topics'),
#特定主题的详细页面
path('topics/(?P<topic_id>\d+)/',views.topic,name='topic'),
path('new_topic/', views.new_topic, name='new_topic'),
path('new_entry/(?P<topic_id>\d+)/)',views.new_entry,name='new_entry'),
path('edit_entry/(?P<entry_id>\d+)/', views.edit_entry,name='edit_entry'),
]
错误5:ModuleNotFoundError: 'django.core.urlresolvers' という名前のないモジュール
ソリューション:
from django.urls import reverse
错误6:TypeError例外:INIT()欠落1つの必須位置引数'on_delete'
ソリューション:
ウィルowner = models.ForeignKey(User)
変更しますowner = models.ForeignKey(User, on_delete=models.CASCADE)
错误7:1以上フリーサイズdynosを実行することはできません。
ソリューション:
heroku ps
heroku ps:stop run.5656
heroku ps:stop web.1
エラー8:Gitのbashはgitのログを実行し終了することはできません
ソリューション:
プレスqが終了することができ、はい、あなたは正しい読み、それは簡単です!!!最初は私が出ることができないか、あなたのためにあまりにも苦痛だった- |||
エラー9:クイックは、不正の下でのLinuxのターミナルを削除します
ソリューション:
押して、バックスペースキーを押しながらESCキーを押し、[ESC +バックスペース]は、[CTRL + U]も利用可能であると述べました。
エラー10:gitのプッシュHerokuのマスターエラー
次のとおりです。
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://git.heroku.com/ xxxxx.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ソリューション:
git push heroku master -ff
時にはスーパースロー、あなたは再実行を終了するか、少し待ってからプッシュすることができ、起動または接続されています。
エラー11:Djangoはpycharmでいくつかの問題かもしれ
ソリューション:
最後に、感謝Baiduの兄と少し美しさ、記念彼らの最初の小さなプロジェクトの後にあなたを助けるために、あなたのお母さんの度に感謝