Ah that did it. The other thing I was doing wrong, the reason all the
different things i was trying didnt get me anywhere- I hadnt run
syncdb when I should of. That stupid mistake wasted a lot of time..
Its taken a while but it appears to be working perfectly now! Thanks
for your help.
Phil

On 4 Dec, 18:17, Brian Neal <[EMAIL PROTECTED]> wrote:
> On Dec 4, 11:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:> I apologise for spamming everyone, here i stuck it up at dpaste with
> > the comments which makes it a bit clearer-http://dpaste.com/96128/
>
> You are almost there. You are assigning a form instance to your custom
> profile's user foreign key. That is not what you want. You want to
> assign the appropriate user instance to that foreign key field.
>
> Instead of:
> extraformedit.user = userformInstance
>
> Try this:
> extraformedit.user = request.user
> or
> extraformedit.user = userforminstance.user
>
> Another suggestion: you probably need to check to see if both forms
> are valid before going ahead with the saving.
>
> if form.is_valid() and extraform.is_valid():
>
> I recently did something similiar, I found my code and dpasted it. In
> my case I am showing the view for a user to edit her existing profile.
> I hope it helps:http://dpaste.com/96150/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to