Как получить шаблон уровня 3 для запуска JS с JS на уровне 1 / base?
base.html
<html>
<head>
{% block inline-scripts %}{% endblock inline-scripts %}
</head>
<body>
{% block content %} Default Content{% endblock content %}
<body>
</html>
level1.html
{% extends "base.html" %}
{% load static %}
{% block inline-scripts %}
{% this will get loaded %}
<script src='some/file.js'></script>
{% endblock inline-scripts %}
{% block content %}
Level 1 Content
{% include 'level2.html' with whatever=variables %}
{% endblock content %}
level2.html
{% load static %}
Level 2 HTML
{% include 'level3.html' with whatever=variables %}
level3.html
{% load static %}
Level 3 HTML - How do I get the JS here to have the scope of the level 1/base
{% block inline-scripts %}
{% this will NOT get loaded %}
$(document).ready(function() {
//Current error
//Uncaught ReferenceError: $ is not defined
})
{% endblock inline-scripts %}
<script>
manuallyEnteringJS.doesntWorkEither
</script>