Ticket #1109 (accepted defect)

Opened 3 years ago

Last modified 3 years ago

m2m tables greted twice

Reported by: anonymous Owned by: andrew
Priority: minor Milestone: The Future
Component: commands Version: 0.7.5
Keywords: Cc:

Description

This creates the m2m table twice.

This is idiomatic if you want the relation to show up bidirectionally in the admin or in autogenerated forms; cf. https://code.djangoproject.com/ticket/897

class Test1(models.Model):
    tests2 = models.ManyToManyField('Test2', blank=True)

class Test2(models.Model):
    tests1 = models.ManyToManyField(Test1, through=Test1.tests2.through, blank=True)

Change History

comment:1 Changed 3 years ago by anonymous

greted => created. *Sigh*.

comment:2 Changed 3 years ago by andrew

  • Status changed from new to accepted
  • Version changed from unknown to 0.7.5
  • Milestone set to The Future

Hmm, I guess this is the case, but it won't be a high priority to fix - after all, you'd be better off defining the through model explicitly as a separate model and assigning that to both M2Ms.

Note: See TracTickets for help on using tickets.