On Wed, May 14, 2008 at 3:43 PM, James Tauber <[EMAIL PROTECTED]> wrote: > > On a couple of occasions, I've had need for a model that links two > instances of another model and I'm wondering about the best practices > for doing this. > > Abstractly, there's an undirected graph where both nodes and arcs are > objects. ... > If the arc were just a M2M field on the node, one could use > symmetrical=True but it isn't clear to me the best way to do this > where the arc/association is its own model.
Hi James, It sounds like you might be looking for ticket #6095 [1]. This lets you define an intermediate model to use for m2m relations. This allows you to put attributes on the arc, query over the arc attributes, and be symmetrical (or not). Last time I looked, Eric's implementation was getting pretty close. I'm hoping to have some time to look at this ticket next week. [1] http://code.djangoproject.com/ticket/6095 Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---