Re: Initial data in a many to many field

2010-03-25 Thread mjlissner
I wasn't using ProfileForm(instance = userProfile) because I didn't realize I could. Wow, that makes things easier and neater. Thanks so much. On Mar 25, 11:57 am, Nuno Maltez wrote: > >On Thu, Mar 25, 2010 at 2:00 AM, mjlissner wrote: > > I'll make things more concrete. I have the following in

Re: Initial data in a many to many field

2010-03-25 Thread Nuno Maltez
>On Thu, Mar 25, 2010 at 2:00 AM, mjlissner wrote: > I'll make things more concrete. I have the following in my model > (which is made into a ModelForm): > class UserProfile(models.Model): >    barmembership = models.ManyToManyField(BarMembership, >        verbose_name="the bar memberships held by

Initial data in a many to many field

2010-03-24 Thread mjlissner
I've been struggling with this literally for hours. I'm trying to use a ModelForm with initial values being set as those that are already in the DB for a user. This works marvelously for every field that I have EXCEPT for the one manytomany field I have in my model. For that one, I can submit the