On Feb 6, 8:45 pm, Simon Meers wrote:
> 2011/2/5 Carl Meyer
> > Hi Mike,
>
> > On Feb 3, 4:36 pm, Mike Lindsey wrote:
> > > I'm doing something with bidirectional ManyToManyFields, in a project
> > > I'm working on, that is resulting in duplicate attempts to create the
> > > intermediate table
2011/2/5 Carl Meyer
>
> Hi Mike,
>
> On Feb 3, 4:36 pm, Mike Lindsey wrote:
> > I'm doing something with bidirectional ManyToManyFields, in a project
> > I'm working on, that is resulting in duplicate attempts to create the
> > intermediate tables. I'm perfectly open to suggestions of "You're
>
On 2/4/11 8:17 PM, Carl Meyer wrote:
That said, I think it's a reasonable feature request. But I don't
think defining the ManyToManyField on both models, with some kind of
"abstract" flag on one side, is the right feature request. There's no
reason it should have to be redundantly defined on both
Hi Mike,
On Feb 3, 4:36 pm, Mike Lindsey wrote:
> I'm doing something with bidirectional ManyToManyFields, in a project
> I'm working on, that is resulting in duplicate attempts to create the
> intermediate tables. I'm perfectly open to suggestions of "You're
> doing it wrong" if they come with
Unfortunately you've missed the same thing that every other person who's
said the same thing has missed:
Admin forms, fieldsets, and filter_horizontal.
Django provides implicit reverse models, but they are not the same, and
do not act the same as explicit ManyToMany relationships. I'll be ver
A ManyToMany field on one model will automatically place a corresponding
field in the other model that provides the reverse lookup. For example,
if you have:
class HostGroup(models.Model):
hosts = models.ManyToManyField('Host', blank=True, null=True,
related_name='ho
Maybe it's a too large of a lunch, but I'm not sure how to answer that.
A HostGroup object has a relationship to multiple Host objects, and a
Host object has a relationship to multiple HostGroup objects. There are
also 13 or 14 more sets of paired relationships like that, spread
across six o
Does '%(class)s_hosts' represent the reverse relationship of
'%(class)s_hostgroup' like:
HostGroups <-> Hosts
Or is a tree-like structure like:
... <-> HostGroups1 <-> Hosts1 <-> HostGroups2 <-> Hosts2 <->
Where HostGroup2 has a relationship to Hosts1 and a separate
relationship to Hosts2?
On 2/3/11 11:22 PM, Gert Van Gool wrote:
Can you give an example of the model(s) you're talking about?
Certainly. Simplified and stripped version:
class HostGroup(models.Model):
hosts = models.ManyToManyField('Host', blank=True, null=True,
related_name='%
Can you give an example of the model(s) you're talking about?
-- Gert
Mobile: +32 498725202
Twitter: @gvangool
Web: http://gert.selentic.net
On Thu, Feb 3, 2011 at 22:36, Mike Lindsey wrote:
> I'm doing something with bidirectional ManyToManyFields, in a project
> I'm working on, that is resu
I'm doing something with bidirectional ManyToManyFields, in a project
I'm working on, that is resulting in duplicate attempts to create the
intermediate tables. I'm perfectly open to suggestions of "You're
doing it wrong" if they come with advice on how to fix my problem,
without losing the easy A
11 matches
Mail list logo