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 write a custom clean method on the form, which  
would do a string replace, but this isn't working. The FloatFields  
clean method is run before any custom method. If there's a comma in  
the field, that method will raise an exception and my custom method  
never gets called.

Any ideas for a solution would be welcome.

Thanks,
Knut
-- 
Knut Nesheim  | MTAB Transport & Spedition AB
Box 20164 | SE-161 02 Bromma | Visiting address: Ranhammarsvägen 26
Phone: +46 8 54 600 153
E-mail: knut.nesh...@mtab.se  | Web: www.mtab.se

Vi utför alla uppdrag på grundval av NSAB 2000.
All transactions are carried out according to our standard conditions  
covered by NSAB2000





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to