Hi!

I want to create an object that contains 2 links to users. For example

class GameClaim(models.Model):
    target = models.ForeignKey(User)
    claimer = models.ForeignKey(User)
    isAccepted = models.BooleanField()

but I am getting an error when running server:

Accessor for field 'target' clashes with related field 'User.gameclaim_set'.
Add a related_name argument to the definition for 'target'.
Accessor for field 'claimer' clashes with related field
'User.gameclaim_set'. Add a related_name argument to the definition for
'claimer'.

Please explain why I am getting the error and how to fix it?

Thanks,
Oleg

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

Reply via email to