Newforms and composite widgets

2006-12-09 Thread Brian Victor
One of the things I was hoping for in newforms but haven't found is a way to do a composite form field that uses multiple elements that reduce to a single python object. E.g., >>> class MyForm(Form): ... postdate = CompositeField(ChoiceField(choices=['Jan', ...]), ...

Re: Newforms and composite widgets

2006-12-24 Thread Adrian Holovaty
On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: One of the things I was hoping for in newforms but haven't found is a way to do a composite form field that uses multiple elements that reduce to a single python object. E.g., >>> class MyForm(Form): ... postdate = CompositeField(ChoiceF

Re: Newforms and composite widgets

2007-01-03 Thread gordyt
Adrian I have been experimenting with the SelectDateWidget and I have noticed one bit of strange behavior. Wondering if I'm using it incorrectly. My original element in the form class is this: date_opened = forms.DateField(initial=date.today()) This works as expected and if the data supplied

Re: Newforms and composite widgets

2007-01-03 Thread Adrian Holovaty
On 1/3/07, gordyt <[EMAIL PROTECTED]> wrote: date_opened = forms.DateField( initial=date.today(),widget=SelectDateWidget) This does render the composite widget just fine, but it will not use a date_opened value that is supplied with the form class is instantiated and so displays the error s

Re: Newforms and composite widgets

2006-12-17 Thread Brian Victor
Adrian Holovaty wrote: > On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: >> One of the things I was hoping for in newforms but haven't found is a >> way to do a composite form field that uses multiple elements >> that reduce to a single python object. E.g., [snip] >> Is there a way to obtain

Re: Newforms and composite widgets

2006-12-17 Thread Adrian Holovaty
On 12/17/06, Brian Victor <[EMAIL PROTECTED]> wrote: > Adrian Holovaty wrote: > > On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: > >> One of the things I was hoping for in newforms but haven't found is a > >> way to do a composite form field that uses multiple elements > >> that reduce to a