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

Handling single quotes in field values #75

Open
andybak opened this issue Mar 27, 2016 · 0 comments
Open

Handling single quotes in field values #75

andybak opened this issue Mar 27, 2016 · 0 comments

Comments

@andybak
Copy link
Collaborator

andybak commented Mar 27, 2016

The javascript renderer for the chart object's options breaks when field names contain single quotes.

I had a look at the code and found it slightly confusing - especially this part: https://github.com/juanpex/django-model-report/blob/master/model_report/highcharts/__init__.py#L227

Which seems like a workaround for the fact can't just use simplejson.dumps by itself as you're using a custom DictObject instead of a normal Python dict.

I couldn't quite work out the purpose of DictObject and CollectionObject but I have a gut feeling that the code would be simpler if the need for them could be avoided. I ran out of time to dig deeper so I wonder if you could give me a bit of background on this area?

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