[Answered ]-How to create a user profile when creating a new user

2👍

✅

You are trying to access the related object, while it does not exist when you would do u.userprofile

Try it the same way you are creating the User object instead:

UserProfile.objects.create(user=u, company_name="onetwo")

Leave a comment