Hi,

I solved it that way:

class PersonCollaboration(models.Model):
        person1 = models.ForeignKey('Person', related_name='person1')
        person2 = models.ForeignKey('Person', related_name='person2')
        timestamp_created = models.DateTimeField(default=datetime.now)

class Person (models.Model):
        name = models.CharField(max_length=250, unique=True)
        collaborate_with = models.ManyToManyField('self',
through='PersonCollaboration', symmetrical=False)

This way, I get a table with person1_id, person2_id and I can add
additional fields.

I have to take care about the missing symmetrical property for myself,
but this is okay.

Have a nice day,

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