From 05f324c76c675857ea1cd8225c55075408beff33 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sun, 17 Mar 2019 18:08:39 +0100 Subject: templates: Add tag for d3js Create a simple tag for outputting the d3js ' % link) +@register.simple_tag +def d3js(): + version = '3.0.6' + filename = 'd3-%s.min.js' % version + link = staticfiles_storage.url(filename) + return format_html('' % link) + # vim: set ts=4 sw=4 et: diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index 89345664..dd19e80d 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -111,8 +111,7 @@ {% endblock %} {% block script_block %} -{% load cdn %}{% jquery %}{% jquery_tablesorter %} - +{% load cdn %}{% jquery %}{% jquery_tablesorter %}{% d3js %} +{% load cdn %}{% jquery %}{% jquery_tablesorter %}{% d3js %} +{% load cdn %}{% jquery %}{% d3js %}