Thanks Karen yet again. Am I right in thinking that this cannot be a symetrical arrangement ie:
connector can access values from cable(s) and cable can access values from connector(s) It does not appear to be possible to put a ManyToManyField in both the "parent' models, because one must be declared before the other, and the other is therefore invalid at that time Perhaps there is a work around? Mike On Nov 29, 2:56 pm, Karen Tracey <[email protected]> wrote: > On Sat, Nov 28, 2009 at 11:50 PM, adelaide_mike <[email protected] > > > > > wrote: > > I have three models: > > > class Connector(models.Model): > > connectorname = models.CharField(max_length=32) > > > class Cable(models.Model): > > cablename = models.CharField(max_length=32) > > > class Node(models.Model): > > connector = models.ForeignKey(Connector) > > cable = models.ForeignKey(Cable) > > node_specific_data = models.CharField(max_length=32) > > > I wish to make a report displaying all Connector names at least once, > > and the Cable name that the Node model relates them to. If I did not > > need the nodespecificdata I could have used a many-to-many between > > Connector and Cable. Sadly I do need it. > > The extra information doesn't prohibit use of ManyToMany, see: > > http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-o... > > Karen -- 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.

