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

Use DjangoJSONEncoder instead of custom LazyStringEncoder #11907

Merged
merged 1 commit into from Apr 30, 2024

Conversation

laymonage
Copy link
Member

Cleanup of #11620. The built-in DjangoJSONEncoder can handle lazy strings and other types (e.g. Decimal, datetimes).

I've confirmed that without the cls argument, we have failing tests, and those pass when we use DjangoJSONEncoder.

Copy link

squash-labs bot commented Apr 30, 2024

Manage this branch in Squash

Test this branch here: https://laymonagedraftail-djangojsonen-bndlf.squash.io

Copy link
Member

@lb- lb- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better - thank you!

I thought there must be a better way when I was looking into the other PR, glad there is.

@laymonage laymonage merged commit 56e69bc into wagtail:main Apr 30, 2024
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants