Re: Newforms StrippedCharField

2007-06-17 Thread Jyrki Pulliainen
On 6/13/07, Norman Harman <[EMAIL PROTECTED]> wrote: > > Kind of think CharField should do this, but I can imagine someone not > wanting it. > > class StrippedCharField(forms.CharField): > """ > Newforms CharField that strips trailing and leading spaces > """ > def clean(self,

Newforms StrippedCharField

2007-06-12 Thread Norman Harman
Kind of think CharField should do this, but I can imagine someone not wanting it. class StrippedCharField(forms.CharField): """ Newforms CharField that strips trailing and leading spaces """ def clean(self, value): if value is not None: value = value.str