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.
A Connector may have any number of related nodes, including none.
I need to obtain a report displaying all connectors at least once,
with their related cablename(s), if any, shown (on additional rows if
necessary). Can I do this without resorting to raw SQL?
Thanks (yet again)
Mike
--
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.