Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2つのフォームからの入力の保存に問題があります。1つはユーザー作成フォームで、もう1つはUserProfile作成フォームです。Creation_form.save()を呼び出してからprofile_form.save()を呼び出そうとすると、プロファイルに値がないためにIntegrityErrorが発生し、最初にプロファイルフォームを保存しようとすると、ユーザーがまだIDを持っていません。
問題を修正しました!私のmodels.pyからpost_save.connect(create_user_profile、sender = User)を削除する必要があります