Loading external script with jinja2 template directive

Viewed 32036

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:

{% block javascript %}
    <script src="myscript.js"></script>
{% endblock %}

But I can't help to ask:

Is there a way of loading this script directly from within a template directive?

2 Answers
Related