Re: newforms: MultiValueField and MultiWidget

2007-04-19 Thread sparky
On Feb 19, 10:18 pm, "Justin Findlay" <[EMAIL PROTECTED]> wrote: > On Jan 25, 1:16 pm, "canen" <[EMAIL PROTECTED]> wrote: > > > Answering my own question: > Thanks for the example! I created another, but it uses initial data, and an object representing the info. class Postal(object): def _

Re: newforms: MultiValueField and MultiWidget

2007-02-19 Thread Justin Findlay
On Feb 19, 1:18 pm, "Justin Findlay" <[EMAIL PROTECTED]> wrote: > Canen, do you have the time to work out a full example? After much > trying I'm still not able to repeat the example without having to use > the double tuple values. Nevermind. I misunderstood what you meant by repeating choices.

Re: newforms: MultiValueField and MultiWidget

2007-02-19 Thread Justin Findlay
On Jan 25, 1:16 pm, "canen" <[EMAIL PROTECTED]> wrote: > Answering my own question: > > The widget can be declared as part of the field, e.g. > > # Field > class MoneyField(MultiValueField): > def __init__(self, currency=(), amount=(), required=True, > widget=None, label=None, initial=None): >

Re: newforms: MultiValueField and MultiWidget

2007-01-25 Thread canen
Answering my own question: The widget can be declared as part of the field, e.g. # Field class MoneyField(MultiValueField): def __init__(self, currency=(), amount=(), required=True, widget=None, label=None, initial=None): widget = widget or MoneyWidget(currency=currency, amount=amou