On Friday 29 Jan 2010 8:36:06 am Kenneth Gonsalves wrote:
> I have a model called Matchentry. It is this:
>
> class Matchentry(models.Model):
> tournament = models.ForeignKey(Tournament,verbose_name=_("Tournament"))
> player = models.ForeignKey(Player,verbose_name=_("Player"))
>
> class Meta:
> unique_together = ("tournament", "player")
>
> def __unicode__(self):
> return u"%s: %s" %(self.player,self.tournament)
>
> using ModelForm, I get this error:
>
> ERROR: invalid input syntax for integer: "<QueryDict: {u'player': [u'3'],
> u'csrfmiddlewaretoken': [u'8ba1dfc67c7bb739f8cf31e7566b3ef9'],
> u'tournament': [u'1'], u'save': [u'Save']}>"
>
solved - stupid mistake, when overriding __init__ for the Matchentryform, put
the variables in the wrong order.
--
regards
Kenneth Gonsalves
Senior Project Officer
NRC-FOSS
http://nrcfosshelpline.in/web/
--
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.