On Wed, Mar 22, 2006 at 10:04:31AM +0100, Alberto Valverde wrote:
> 
> Hi,
> 
> You could try doing the conversion in the validator. The you don't  
> care if it's compound or not because the validator can take care of  
> all the translation:
> 
> 
> class MyValidator(FancyValidator):
>       def to_python(self, value, state=None):
>             # collect all sub widget values in 'value' and return a  
> string
>       def from_python(self, value, state=None):
>             # get the string and build a dict to pass to the subwidgets
> 
> class FancyCalendar(CompoundWidget):
>       validator = MyValidator()
> 
> Hope it helps,
> Alberto

Awesome.  I knew there was something I was missing with validators.  That
should be perfect.

Jason

-- 
If you understand, things are just as they are.  If you do not understand,
things are just as they are.

Attachment: pgp3LJBkEumE0.pgp
Description: PGP signature

Reply via email to