Actually, it seems a bit redundant doesn't it? I see there is a get_profile, but nothing to set it anyway. I guess it's derived information from the database.... Yay! such simple solutions, I'm so happy to be able to register.
On Dec 20, 9:42 am, DragonSlayre <lssay...@gmail.com> wrote: > You are gods - thank you. I did try something like this before, but > being so noob at the technology, didn't assign the form to a new > variable. > > Will i have to assign the profile in the user object as well? I > assume I will. > > On Dec 20, 9:38 am, Daniel Roseman <roseman.dan...@googlemail.com> > wrote: > > > On Dec 19, 8:28 pm, nbv4 <cp368...@ohio.edu> wrote:> On Dec 19, 3:15 pm, > > DragonSlayre <lssay...@gmail.com> wrote: > > > > > profile_form.user = user; > > > > profile_form.save() > > > > The problem is that you can't assign fields in forms directly like > > > this. The only way to input data into a form is when you initially > > > create the form object ala: > > > > profile_form = ProfileForm(request.POST) > > > > If theres another way I'd love to know too, because I ran into this > > > problem earlier and my only solution was to manually create an hidden > > > textbox with the user_id. > > > <snip> > > > The easiest way is to do it like this: > > new_profile = profile_form.save(commit=False) > > new_profile.user = request.user > > new_profile.save() > > -- > > DR. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---