The common use case on my projects is definitely to trim whitespace.
The autostrip decorator I found on djangosnippets (http://
www.djangosnippets.org/snippets/956/) is pretty awesome, but I'd
prefer not to import that into every project and it would be nice to
not call:

> MyForm = autostrip(MyForm)

on practically every form I have with a CharField

What's the common use case for allowing a user to add a space at the
end of a datetime field or email field, or pretty much any text field?
It seems like that those situations are in the minority and the strip
argument would make things simpler for the simple case while remaining
backwards compatible.

-Wes

On Oct 10, 5:47 pm, Taylor Marshall <taylor.paul.marsh...@gmail.com>
wrote:
> I'd love to see this change get put in.  I think the most common case
> for forms is to trim whitespace, not the other way around.  I'd rather
> have the extra work come in for the rare case (when you wanted to
> preserve leading/trailing spaces).
>
> -Taylor
>
> On Oct 10, 11:37 am, Barry Pederson <b...@barryp.org> wrote:
>
>
>
> > On May 13, 2:56 am, Russell Keith-Magee <freakboy3...@gmail.com>
> > wrote:
> >  >On Wed, May 13, 2009 at 7:48 AM, thebitguru <fah...@gmail.com> wrote:
>
> >  >> Hi,
>
> >  >> What do we need to make a decision for ticket 6362 (http://
> >  >> code.djangoproject.com/ticket/6362)?
>
> >  > We need to wait until we're not trying to get v1.1 out the door.
>
> >  > We are well past the feature deadline for v1.1; the focus of the
> >  > community is on fixing bugs and finalizing the v1.1 release. Once that
> >  > happens, we will be in a position to concentrate on design decisions
> >  > again.
>
> > Now that we're talking about 1.2, I hope this can be looked at before
> > the door closes again.  Either this or the simpler patch from
>
> >    http://code.djangoproject.com/ticket/4960
>
> > Having extraneous spaces in user input is quite annoying and can cause a
> > fair amount of trouble.  Yes, you could write custom validation for
> > every single one of your forms, but a global fix is potentially pretty
> > trivial.
>
> > Some other tickets complaining about the same problem with specific
> > field types are:
>
> >    http://code.djangoproject.com/ticket/5714
> >    http://code.djangoproject.com/ticket/11907
>
> >         Barry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to