Modify

Ticket #1109 (accepted defect)

Opened 23 months ago

Last modified 23 months 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)

Attachments

Change History

comment:1 Changed 23 months ago by anonymous

greted => created. *Sigh*.

comment:2 Changed 23 months 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.

View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.