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-on-many-to-many-relationships

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.


Reply via email to