Re: help with ManyToMany

2016-02-02 Thread dave.l
Hi Peter, Thank you -- that's perfect! On Monday, February 1, 2016 at 6:49:31 AM UTC, Peter of the Norse wrote: > > I hope you forgive me skipping all of that getattr nonsense. > > others = Studio.objects.filter(studio_group__in = > choice.studio_group_set.all()).exclude(pk=choice.pk) > > On Ja

Re: help with ManyToMany

2016-01-31 Thread Peter of the Norse
I hope you forgive me skipping all of that getattr nonsense. others = Studio.objects.filter(studio_group__in = choice.studio_group_set.all()).exclude(pk=choice.pk) > On Jan 28, 2016, at 2:16 AM, dave.l wrote: > > Hi, > > I am happy with my models, and I'm fine inserting data, what I would lik

Re: help with ManyToMany

2016-01-28 Thread dave.l
Hi, I am happy with my models, and I'm fine inserting data, what I would like help with is retrieval. given a single instance of a Studio() I can get studio.studiogroup_set.all() which I can then iterate to find the individual studios and build my resulting list ensuring no duplicates and not

Re: help with ManyToMany

2016-01-27 Thread Xristos Xristoou
your code is correct,where are the problem ?in the admin first add Studio and sfter this select on the field studio from class studiogroup one or more entries from the class studio so simple, christos Τη Τετάρτη, 27 Ιανουαρίου 2016 - 5:50:21 μ.μ. UTC+2, ο χρήστης dave.l έγραψε: > > Hi, > > I h

help with ManyToMany

2016-01-27 Thread dave.l
Hi, I have recently returned to a Django project after a few years and I'm a little rusty on ManyToMany fields. Here's my very simple models: class Studio(models.Model): name = models.CharField(max_length=255, unique=True) class StudioGroup(models.Model): description = models.CharFiel