Re: Custom form where fields in Form do not match Model

2008-03-09 Thread speleolinux
On Mar 9, 1:31 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > If you are going to populate a Decision from self.cleaned_data, then you > need to remove choice1 and choice2, etc, from the cleaned_data dictionary > that you return from your clean() function. Removing them from base_fields > I do

Re: Custom form where fields in Form do not match Model

2008-03-08 Thread Karen Tracey
On Sat, Mar 8, 2008 at 6:49 AM, speleolinux <[EMAIL PROTECTED]> wrote: > > Hi > > On Mar 7, 11:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > It is fairly important when reporting an error like this that you give > > enough information to indicate where the error is coming from. > ...

Re: Custom form where fields in Form do not match Model

2008-03-08 Thread speleolinux
Hi On Mar 7, 11:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > It is fairly important when reporting an error like this that you give > enough information to indicate where the error is coming from. ... Sorry. See at bottom. > Guessing a lot here (it looks like there's only one place "ch

Re: Custom form where fields in Form do not match Model

2008-03-07 Thread Malcolm Tredinnick
On Fri, 2008-03-07 at 16:59 +1100, Michael Lake wrote: [...] > In forms.py I have: > > class AddDecisionForm(forms.Form): > > choice1 = forms.CharField(label='choice1', required=False) > choice2 = forms.CharField(label='choice2', required=False) > > enumerated-choices = [] > if

Custom form where fields in Form do not match Model

2008-03-06 Thread Michael Lake
Hi all I'm having problems in saving a custom form. The form presents list of choices for a user. In the model the choices are stored single string field 'choices'. But in my form I wish to present a list of choices and concatenate them together to save into the model. - Hence the model has 'choi