Re: Need help with db save.

2018-12-12 Thread Ira Abbott
Hi, Profile(newuser.pk,customerid=form1.cleaned_data['customer']) should be: Profile(user_id=newuser.pk,customerid=form1.cleaned_data['customer']) user is a ForeignKey, so you assign user= after performing a get(), or you use the form above with your pk - i.e. 'the user record whose id field

Need help with db save.

2018-12-12 Thread progmgppers
Hi, I'm trying to save a new user and their profile information in same form and view. It is almost working, but cant get by this error. [image: errmsg.png] I know I have values available because I print them just before saving from my views.py, which is: def addUser(request): template_n