NOT NULL constraint failed error
Problem is that user in UserProfile is required, but you are not setting user field in UserProfileForm. Database didn't get user_id, so it tried to set null on this field, but field have not not null constraint. You can set null=True on field definition in UserProfile model, or overwrite save (or probably is_valid) form method to set user automatically, or add user field to UserProfileForm, or whatever what you want.