Loading external script with jinja2 template directive
You have two choices here — the first is the way you did it — simply add the appropriate markup into a template (or a block if you want to be able to override it in templates which extend your first template.) The second way is to use Jinja2’s include function: {% block javascript %} … Read more