Загрузите Apache-arrow.js в проект Django
Изучаю веб-разработку и использую Django. Мое приложение будет потреблять много данных и я думал интегрировать Apache-arrow.js
Меня вдохновил приведенный ниже блог на сайте apache arrow js ( https://arrow.apache.org/docs/js/ ) : https://observablehq.com/@theneuralbit/introduction-to-apache-arrow
Для Django я создал папку static, в которую загрузил версию es5-umd.
В моем html у меня есть следующее :
Adding type=="module" - doesn't help and console log do not print "test2" or "test1"
I copied the example from apache arrow js website just to test. I get the error - " :arrow.js:20 Uncaught TypeError: Cannot read property 'Arrow' of undefined"
{% load static %} <html lang="en"> <head> <script src="{% static 'js/apache-arrow/es5-umd/arrow.js' %}" > console.log('test1') </script> <script type="module" src="{% static 'js/apache-arrow/es5-umd/arrow.js' %}"> const LENGTH = 2000; const rainAmounts = Float32Array.from( { length: LENGTH }, () => Number((Math.random() * 20).toFixed(1))); const rainDates = Array.from( { length: LENGTH }, (_, i) => new Date(Date.now() - 1000 * 60 * 60 * 24 * i)); const rainfall = Table.new( [FloatVector.from(rainAmounts), DateVector.from(rainDates)], ['precipitation', 'date'] ); console.log('test2') </script> <script > console.log('test3') </script>
Не уверен, в чем проблема, далее я думаю попробовать browserify.