On Dec 19, 3:15 pm, DragonSlayre <[email protected]> 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.

also, make sure if the user already has a profile in the database,
that you create a bound form:

profile_form = ProfileForm(request.POST,
instance=request.user.get_profile())


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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