Python Django图表未显示。Jquery问题?

Python Django图表未显示。Jquery问题?,python,jquery,django,highcharts,Python,Jquery,Django,Highcharts,还有大约4-5个其他帖子与我有相同的问题,但要么a.)该解决方案不适合我,要么b.)没有建议的解决方案。我希望有人能帮我解决这个问题。使用Chartit,看起来我正在正确地传递对象的数据,我的模板最终命中了所有必要的Java脚本,现在我从控制台得到了这个问题: VM49842 chartloader.js:3 Uncaught ReferenceError: $ is not defined at VM49842 chartloader.js:3 highcharts.js:10 Unca

还有大约4-5个其他帖子与我有相同的问题,但要么a.)该解决方案不适合我,要么b.)没有建议的解决方案。我希望有人能帮我解决这个问题。使用Chartit,看起来我正在正确地传递对象的数据,我的模板最终命中了所有必要的Java脚本,现在我从控制台得到了这个问题:

VM49842 chartloader.js:3 Uncaught ReferenceError: $ is not defined at VM49842 chartloader.js:3  

highcharts.js:10 Uncaught Error: Highcharts error #13: www.highcharts.com/errors/13
    at Object.a.error (highcharts.js:10)
    at a.Chart.getContainer (highcharts.js:250)
    at a.Chart.firstRender (highcharts.js:265)
    at a.Chart.<anonymous> (highcharts.js:241)
    at a.fireEvent (highcharts.js:30)
    at a.Chart.init (highcharts.js:240)
    at a.Chart.getArgs (highcharts.js:239)
    at new a.Chart (highcharts.js:239)
    at Object.<anonymous> (VM49842 chartloader.js:5)
    at Function.each (jquery.1.7.2.min.js:2)
我已经读到它可能会干扰其他脚本,但我的Django项目中没有其他javascript,除了管理门户中包含的内容

Settings.py在已安装的应用程序中有'chartit',因为我还听说脚本从https加载的速度可能比预期的慢,所以我将它们全部安装在我的静态目录中,并运行'python manage.py collectstatic'将它们安装/移动到正确的静态目录

如果可能是我的模型信息,我可以在必要时分享,但如果我查看源代码,它似乎成功地传递了正确的信息

模板-历史图表.html

{% load static %}
{% load chartit %}
{{ graph_display|load_charts:'container' }}

<script type ="text/javascript" src ="/static/js/jquery.1.7.2.min.js"></script>
<script type ="text/javascript" src="/static/js/highcharts.js"></script>

<div class='container'>{{ graph_display|load_charts:'container' }}</div>
{%load static%}
{%load chartit%}
{{图形显示}装载图表:'container'}
{{图形显示}装载图表:'container'}

脚本引用需要放在chartit load变量前面(而不是前面在其他问题中回答的highcharts脚本引用)。工作安排如下:

{% load static %}
<script type ="text/javascript" src ="/static/js/jquery.1.7.2.min.js"> </script>
<script type ="text/javascript" src="/static/js/highcharts.js"></script>
{% load chartit %}
{{ graph_display|load_charts:'container' }}
{%load static%}
{%load chartit%}
{{图形显示}装载图表:'container'}
这清除了chartloader/jquery错误,其中jquery在chartit之后加载。IMO文件中没有明确说明和/或说明这一点。但我仍然收到highcharts的错误,直到我注意到:

<div class='container'>

应改为:

<div id='container'>

脚本引用需要放在chartit load变量前面(而不是前面在其他问题中回答的highcharts脚本引用)。工作安排如下:

{% load static %}
<script type ="text/javascript" src ="/static/js/jquery.1.7.2.min.js"> </script>
<script type ="text/javascript" src="/static/js/highcharts.js"></script>
{% load chartit %}
{{ graph_display|load_charts:'container' }}
{%load static%}
{%load chartit%}
{{图形显示}装载图表:'container'}
这清除了chartloader/jquery错误,其中jquery在chartit之后加载。IMO文件中没有明确说明和/或说明这一点。但我仍然收到highcharts的错误,直到我注意到:

<div class='container'>

应改为:

<div id='container'>