Were I work we have had to do this very thing to support I18N in our
forms. Something as simple as a ":" is not a given. Maybe I want a
" :" instead? This could be a form parameter or even a locale setting.

My 2 cents,
Ted

On Mar 29, 9:10 am, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-03-29 at 13:02 +0000, Jonas Maurus wrote:
> > > I think there are lots of situations where you need to normalize the
> > > labels with some string. Why not just make it an optional parameter to
> > > the Form class with a default value.. maybe ":"?
>
> > > Rune
>
> > so that would make
>
> >    name = forms.CharField(label='What role do you want to play?')
>
> > into
>
> >   name = forms.CharField(label='What role do you want to play',
> > punctuation='?')
>
> > for *sometimes* saving you from typing one character? I still think it
> > makes no sense to append anything at all. Not to mention the pending
> > unicodization... the Japanese, Chinese, Korean and Cyrillic alphabets
> > don't use western punctuation...
>
> > Unless there's a better argument than sometimes saving one character
> > or being backwards-compatible to 0.96, I'm still against this.
> > However, I don't carry much weight around here ;-)
>
> I think he was suggesting in the form, not each field:
>
> form = forms.Form(punct='')
>
> would let you create a form with no colons. You could also do something
> like
>
> form = forms.Form(punct='-->')
>
> or whatever. This would also allow you to override the punctuation based
> on locale. Seems like a not bad solution. People who hate the colons
> could create their own subclass of Form and use it instead of the
> default form and then they wouldn't have to set the punct value each
> time.
>
> Todd


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to