Closed GoogleCodeExporter closed 9 years ago
What would the expected output be if you define custom fields in the
many-to-many
through model ?
As per example at:
http://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-manytomany
Seems to me that in that case (the most common use-case for the 'through'
option?)
you would want to see this model. As it defined fields you would otherwise miss
?
Original comment by v.oostv...@gmail.com
on 9 Jan 2009 at 12:57
> I've created a patch file that I believe will fix it by checking the
> field's creates_table attribute. Not sure what it will do on older versions
> of django.
With older versions you mean versions of django that does not have the
'fields.create_table' attribute ?
If so you could solve that by using: getattr(field, 'create_table', False)
Original comment by v.oostv...@gmail.com
on 9 Jan 2009 at 12:58
Thanks for pointing out the getattr... I'm still really new to python and
django so I
didn't realize you could do that.
I've attached a really crude example of what I was talking about... I'd just
take a
screenshot but am not on a computer where that would be possible.
The basic idea is that you want to see the table that it is going through with
the
one-to-many relationship that it has (which is already showing) what is
undesired is
the fact that you still see the direct many-to-many connection even though you
see
the connection through the bridge. Does that make sense?
Original comment by Zoram...@gmail.com
on 9 Jan 2009 at 3:40
Attachments:
Aah I-see... I was thinking the other way around somehow.. the picture helps a
lot :)
Yeah that direct relationship should not be there when drawing the
through-table.
I've added your patch in svn, thanks for the report !!
Original comment by v.oostv...@gmail.com
on 10 Jan 2009 at 3:36
Original comment by v.oostv...@gmail.com
on 10 Jan 2009 at 3:44
Original issue reported on code.google.com by
Zoram...@gmail.com
on 31 Dec 2008 at 3:00Attachments: