title: Loading external script with jinja2 template directive
body: <p>I'm very new to jinja2 and the use of templates in general so I was wondering if there's an easy way to load an external javascript. I was thinking of using:</p>
  
  <pre class="lang-html prettyprint-override"><code>{% block javascript %}
      &lt;script src="myscript.js"&gt;&lt;/script&gt;
  {% endblock %}
  </code></pre>
  
  <p>But I can't help to ask:</p>
  
  <p><strong>Is there a way of loading this script directly from within a template directive?</strong></p>