【问题标题】:'nvd3_tags' is not a valid tag library“nvd3_tags”不是有效的标签库
【发布时间】:2015-09-22 00:38:12
【问题描述】:

我使用的是 django-charts nvd3,运行时出现此错误

python 管理.py 运行服务器错误:

模板语法错误 'nvd3_tags' 无效 标签库: 找不到模板库nvd3_tags,试过django.templatetags.nvd3_tags,django_admin_bootstrapped.templatetags.nvd3_tag,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>

【问题讨论】:

    标签: python django nvd3.js


    【解决方案1】:

    确保将django_nvd3 添加到设置文件中的INSTALLED_APPS 元组中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-11
      • 2011-05-31
      • 1970-01-01
      • 2012-08-22
      • 2012-04-02
      相关资源
      最近更新 更多