Question

I have an issue with saving input from two forms, one of which is a User creation form and one of which is a UserProfile creation form. When I try to call creation_form.save() and then profile_form.save(), I get an IntegrityError, because the profile doesn't have values, and when I try to save the profile form first, I get an IntegrityError because the user doesn't have an ID yet.

Was it helpful?

Solution

Fixed the issue! Just needed to remove a post_save.connect(create_user_profile, sender=User) from my models.py

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top