We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
It might be interesting to use DjangoJSONEncoder when dumping a dict in trigger_client_event.
django-htmx/src/django_htmx/http.py
Line 63 in 825e349
response[header] = json.dumps(data, cls=DjangoJSONEncoder)
The text was updated successfully, but these errors were encountered:
It might be interesting
I guess it would make sense to fit in with Django, but do you have a use case?
Feel free to open a PR. Please do add a test and changelog note.
Sorry, something went wrong.
Shen it is necessary to serialize data of type date or decimal, which json.dumps does not support, DjangoJSONEncoder can help in these cases.
date
decimal
json.dumps
DjangoJSONEncoder
I did a PR with a test of this.
Successfully merging a pull request may close this issue.
Description
Hi,
It might be interesting to use DjangoJSONEncoder when dumping a dict in trigger_client_event.
django-htmx/src/django_htmx/http.py
Line 63 in 825e349
The text was updated successfully, but these errors were encountered: