django-model-report
django-model-report copied to clipboard
Handling single quotes in field values
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?