Re: How to initialize M2M field in new ModelForm?

2007-12-23 Thread Yatla
Well, I tried the initial arguement again, and it worked this time...must have made a typo the other time I tried this. Thx On Dec 23, 2:03 pm, Yatla <[EMAIL PROTECTED]> wrote: > Joseph, > > Yes, for a new Document, I want to assign to an existing Category. > The initial arguement works for a

Re: How to initialize M2M field in new ModelForm?

2007-12-23 Thread Yatla
Joseph, Yes, for a new Document, I want to assign to an existing Category. The initial arguement works for a form class, which is what I first had, but then modified to use the new ModelForm class. The ModelForm class does not seem to accept an initial arguement. On Dec 22, 5:25 pm, "Joseph

Re: How to initialize M2M field in new ModelForm?

2007-12-22 Thread Joseph Kocherhans
On 12/22/07, Yatla <[EMAIL PROTECTED]> wrote: > > I need to initialize a selection in a M2M field of the Document > ModelForm during the first GET of a form that creates a new Document - > classes and view as follows: > > class DocumentForm(forms.ModelForm): > class Meta: > model =

How to initialize M2M field in new ModelForm?

2007-12-22 Thread Yatla
I need to initialize a selection in a M2M field of the Document ModelForm during the first GET of a form that creates a new Document - classes and view as follows: class DocumentForm(forms.ModelForm): class Meta: model = Document class Document(models.Model): ...