ManyToMany without through table

2016-11-18 Thread 'kgardenia42' via Django users
Lets say I have a User who I want to allow to have many different UserProfile objects (for multi-tenancy). class User(models.Model): # other user fields ... profiles = models.ManyToManyField('UserProfile', related_name='profiles', blank=True, null=True) class UserProfile(models.Model)

ManyToMany without through table

2016-11-18 Thread 'kgardenia42' via Django users
Lets say I have a User who I want to allow to have many different UserProfile objects (for multi-tenancy). class User(models.Model): # other user fields ... profiles = models.ManyToManyField('UserProfile', related_name='profiles', blank=True, null=True) class User

Re: Form/view for ManyToMany relationship

2011-03-04 Thread kgardenia42
On Fri, Mar 4, 2011 at 1:08 PM, werefr0g wrote: > On Thu, Mar 3, 2011 at 11:50 AM, werefr0g wrote: > > Hello, > > Sorry if I misunderstand, but what is wrong about using a ModelForm on your > Film bounded to the film instance? > > My bad... how did I missed the intermediary model involved in the

Re: Form/view for ManyToMany relationship

2011-03-03 Thread kgardenia42
On Thu, Mar 3, 2011 at 11:50 AM, werefr0g wrote: > Hello, > > Sorry if I misunderstand, but what is wrong about using a ModelForm on your > Film bounded to the film instance? When I tried that I kept running into this error: "Cannot set values on a ManyToManyField which specifies an intermediar

Form/view for ManyToMany relationship

2011-03-03 Thread kgardenia42
Hi list, Considering this schema (below) I'm trying to figure out how to create a ModelForm which links Actors to Films (all known actors in a multi- select widget). I can't seem to figure out how to do this in a way that ModelForm will do the heavy lifting. I would like to make a page (e.g. /fi