Subha Bera Subha Bera - 22 days ago 6
Python Question

What is a better option to use django-highcharts package to render charts in template or regular ugly rendering in django?

I am having some confusion to decide what to use for highcharts with django, do I use normal ugly rendering in to

<script></script>
tag or I use the django-highchart (package here)?

Answer

I would suggest normal rendering from front end only as shown in highcharts documentations.

Try to keep backend and front end separate as much as possible. Of course there is a third-party package that you can use but keeping your code modular and segregated is also important.

In future if there is a front end guy who changes/manages the chart code, He need not be forced to learn django first to do front end related tasks. :)