Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix thousand separator wrecking forms #281

Merged
merged 1 commit into from
Jan 1, 2024
Merged

Conversation

mhvis
Copy link
Member

@mhvis mhvis commented Jan 1, 2024

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).

@mhvis mhvis added the bug Something isn't working label Jan 1, 2024
@mhvis mhvis merged commit a0732dc into master Jan 1, 2024
1 check passed
@mhvis mhvis deleted the mhvis/202401/unlocalize branch January 1, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant