I tend to agree that #6362 should be reconsidered.  Realistically
speaking, almost all form fields aren't going to want leading or
trailing spaces.  The default case, therefore, should strip them,
while allowing the app writer to override that behaviour in the small
minority of cases where the whitespace is actually important.

Standard design principle: "Make the common case easy, and the
uncommon case possible."  I have yet to write a field where keeping
the whitespace would be useful, and have written many where it could
cause problems.

-FM

On Thu, Jun 3, 2010 at 7:12 AM, Thomas Guettler <h...@tbz-pariv.de> wrote:
> On "strip keyword arg for CharField"
>
> From http://code.djangoproject.com/ticket/4960
> 09/14/07 11:28:49 changed by adrian
> {{{
> Marking as wontfix -- it's too specialized for inclusion in the main library. 
> A bunch of us in #django-sprint agreed.
> }}}
>
> We should think about this decision again. The cc list of #6362 is quite 
> long. A lot of people (and me)
> want something like this. Ten characters (strip=True), I don't want to type 
> more for this, since I would
> use it for 98% of all my CharFields.
>
>  Thomas
>
> Steven Davidson wrote:
>> Loving v1.2, my first experience with Django: thanks for all the hard work!
>>
>> However this issue has bitten me twice now. I know it is entirely my
>> responsibility to validate and clean user input as required but I really
>> can't think of a valid use case where trailing white space would occur.
>> Also it can snag a 'feature' in MySQL with unique indexes ignoring
>> trailing spaces for comparison purposes.
>>
>> Any chance of a decision on whether this should appear in 1.3 and in
>> what form?
>
>
> --
> Thomas Guettler, http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-develop...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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