Hello, I have a class which has a Foreign Key. e.g. class UserDescription(models.Model): userid = models.ForeignKey(User) title = models.CharField('user salutation', max_length=5) firstname = models.CharField('user firstname', max_length=50) middlename = models.CharField('user middlename', max_length=25) lastname = models.CharField('user lastnmame', max_length=50)
How do I insert a row into the db for this? I tried the following: >>> u1 = User('u1', 'email', 'password') >>> m = UserDescription(u1,'title', 'firstname', 'middlename','lastname' ) but this gives me errors saying : sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type. I tried several other alternatives but i get different errors. Thanks Jimmy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---