title: External d3.sankey: d3 is not recognized - Django
body: <p>I'm trying to incorporate the following sankey example into a django project: <a href="http://bl.ocks.org/d3noob/5028304" rel="nofollow">http://bl.ocks.org/d3noob/5028304</a></p>
  
  <p>I have all my javascript in external sheets, and am calling them in javascript.html which is being pulled into my base.html.  The problem is that the sankey.js file is not recognizing d3.</p>
  
  <p><strong>Uncaught ReferenceError: d3 is not defined(anonymous function) @ sankey.js:22
  (index):83 Uncaught TypeError: d3.sankey is not a function</strong></p>
  
  <p>Part of my actual code for sankey.js is as follows:</p>
  
  <pre><code>$.getScript("../static/js/d3.js", function(){
     alert("d3 loaded but not necessarily executed.");
  });
  $.getScript("../static/js/d3.min.js", function(){
     alert("d3.min loaded but not necessarily executed.");
  });
  $.getScript("../static/js/d3.v3.min.js", function(){
     alert("d3.v3.min loaded but not necessarily executed.");
  });
  d3.sankey = function() {
  </code></pre>
  
  <p>Any help would be appreciated.</p>