Hello, 

With localization and thousand separator active, my foreign keys ids are 
rendered with a thousand separator in django forms and give me an invalid 
field during validation.

in settings.py:
USE_L10N = True
USE_THOUSAND_SEPARATOR = True

example  : 
<option value="17 943" selected="">Company something something</option> 
with the french localization

For now i just override the template 
django/forms/widgets/select_option.html with the safe filter :
<option value="{{ widget.value|safe }}"{% include 
"django/forms/widgets/attrs.html" %}>{{ widget.label }}</option>

I think it would be nicer to have the safe filter in the default template 
from django repository.

Now i file it here to see if people consider it as a bug or if this 
behavior is considered as normal and if others get this problem as well, 
before filing a ticket on djangoproject.com.

Regards, 

Thomas.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/945045e0-d7bf-42ec-983f-b75b78ca86b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to