I have yet to get into the new forms so I can answer you precisely but
you should try something like:

class MemberDescriptionForm(forms.Form):
-     user = forms.CharField()
+    user_id = forms.CharField()

You probably have to write to your own code to convert the username to
an id and I didn't see that included in your post.

If you want to enter the user id in the form then you would rather user
the integer field to get sure it's an integer.
user_id = forms.IntegerField()

On Dec 28, 9:09 pm, "ElGranAzul" <[EMAIL PROTECTED]> wrote:
Sorry, but i press the enter key before end :(

The form definition is:

class MemberDescriptionForm(forms.Form):
    user = forms.CharField()
    gender = forms.ChoiceField(choices=GENDER, widget=RadioSelect)
    birth = forms.DateField(widget=SelectBirthDateWidget)

## SelectBirthDateWidget is a subclass of SelectDateWidget

The problem is that when I try to save the model, it doesn't handle the
FK and give me this error:

Invalid value: 'user' should be a <class
'parejas.profiles.models.UserProfile'> instance, not a <type 'int'>


--~--~---------~--~----~------------~-------~--~----~
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