[Fixed]-Getting table from Django POST request and displaying it in handsontable (read value in javascript)

1๐Ÿ‘

โœ…

If I got your question right, the easiest (but not the most flexible and secure) solution would be to render the js variables just in the Django template:

Assuming your context var my_data contains the data needed for the Handsontable, put this in your_template.html:

<script type="text/javascript">
    var myData = "{{ my_data }}";
    // now your data is on the JS side.
</script>
๐Ÿ‘คAlex Morozov

Leave a comment