You'll have to do something like this:

Country(models.Model):
    name = models.CharField(max_length = 100)
    boders = models.ManyToManyField('self')

    Meta:
        verbose_name_plural = "countries"

BorderLength(models.Model):
    countryA = models.ForeignKey(Country)
    countryB = models.ForeignKey(Country)
    length = models.PositiveIntegerField()

Django 1.0 is supposed to have more direct support for what you want
to do.

On Jun 18, 4:39 am, Peter Bulychev <[EMAIL PROTECTED]> wrote:
> Hello.
>
> Is it possible to insert additional row into table, which corresponds
> to ManyToManyField?
>
> For instance, I have 'Countries' table, which possesses
> ManyToManyField 'borders'. My goal is to store border length for
> neighbor countries by inserting additional field 'length' into the
> 'borders' table.
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to