On Wed, Jun 2, 2010 at 10:36 PM, joelklabo <[email protected]> wrote:
> http://dpaste.org/JjE4/
This should fix it up for you:
class Follow(models.Model):
follower = models.ForeignKey(User, related_name='following')
followee = models.ForeignKey(User, related_name='followers')
What I used for the related name on these isn't important, just the
fact that I'm using it. The problem here is that the ORM is trying to
setup two different 'follow_set' relationships (on the Follow model)
and it won't sort it out for you. You HAVE to supply a related_name
anytime you have two ForeignKeys to the same model.
Hope that helps!
--
Frank Wiles
Revolution Systems | http://www.revsys.com/
[email protected] | (800) 647-6298
--
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.