我在使用django charts nvd3,在运行时遇到了这个错误
Python管理.py runserver错误:
模板语法错误“nvd3_tags”无效标签库: 找不到模板库nvd3_标记,已尝试django.templatetags.nvd3_标签,django_管理员_bootstrapped.templatetags.nvd3_标记,django.contrib.ad公司
我在网上尝试了所有给定的解决方案,但没有任何帮助。 我使用的是django 1.7.1
模板中的代码是。
{% load static %}
<link media="all" href="{% static 'nvd3/src/nv.d3.css' %}" type="text/css" rel="stylesheet" />
<script type="text/javascript" src='{% static 'd3/d3.min.js' %}'></script>
<script type="text/javascript" src='{% static 'nvd3/nv.d3.min.js' %}'></script>
{% load nvd3_tags %}
<head>
<!--{% include_chart_jscss %}-->
{% load_chart charttype chartdata chartcontainer extra %}
</head>
<body>
<h1>Fruits vs Calories</h1>
{% include_container chartcontainer 400 600 %}
</body>
确保将
django_nvd3
添加到设置文件中的INSTALLED_APPS
元组中。在相关问题 更多 >
编程相关推荐