VSEScala / Scala-Dining

Contains the Scala Dining Website Design
4 stars 5 forks source link

Fix thousand separator wrecking forms #281

Closed mhvis closed 8 months ago

mhvis commented 8 months ago

This bug appeared because Django removed the setting USE_L10N in version 5.0. We had it set to false but now this setting can't be disabled anymore. We also had USE_THOUSAND_SEPARATOR set to true. Now hidden primary key values in forms are formatted as 12.345 instead of 12345 breaking the form.

I disabled USE_THOUSAND_SEPARATOR and I changed the templates to use unlocalize for these numbers (as a precaution).