Re: Comma instead of dot in FloatField

2009-04-17 Thread Knut Nesheim
Hi Aidas, 17 apr 2009 kl. 13.01 skrev Aidas Bendoraitis [aka Archatas]: > Actually, what would help you here is custom model field + form field > + widget. > > For example, the following combination based on Babel (http:// > babel.edgewall.org/) could be used: This looks like a great solution

Re: Comma instead of dot in FloatField

2009-04-17 Thread Aidas Bendoraitis [aka Archatas]
Hi Knut, Actually, what would help you here is custom model field + form field + widget. For example, the following combination based on Babel (http:// babel.edgewall.org/) could be used: class DecimalWidget(forms.TextInput): def render(self, name, value, attrs=None): locale=get_cur

Re: Comma instead of dot in FloatField

2009-04-17 Thread julianb
On Apr 17, 9:04 am, Knut Nesheim wrote: > Hi all, > > I have a model with several FloatFields. Based on this, ModelForm   > creates some form.FloatFields.These fields require the user to type   > '3.2' instead of '3,2', which is the custom here(Sweden). We need to   > allow the comma somehow, for

Comma instead of dot in FloatField

2009-04-17 Thread Knut Nesheim
Hi all, I have a model with several FloatFields. Based on this, ModelForm creates some form.FloatFields.These fields require the user to type '3.2' instead of '3,2', which is the custom here(Sweden). We need to allow the comma somehow, for obvious usability reasons. My first thought was to