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

json encoding of option should use DjangoJSONEncoder #77

Open
tisdall opened this issue Oct 2, 2019 · 0 comments
Open

json encoding of option should use DjangoJSONEncoder #77

tisdall opened this issue Oct 2, 2019 · 0 comments

Comments

@tisdall
Copy link

tisdall commented Oct 2, 2019

json_options = json.dumps(options)

The json encoding should use django.core.serializers.json.DjangoJSONEncoder so lazy components from settings can properly be evaluated.

For example, I'm trying to set imageManagerLoadURL using reverse_lazy. However, the default encoding gives a traceback when it encounters the reverse_lazy. If it used DjangoJSONEncoder then it would work properly.

from django.core.serializers.json import DjangoJSONEncoder
json_options = json.dumps(options, cls=DjangoJSONEncoder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant