title: Django 'Include' template with css/js
body: <p>I have a generic template, used for including html (ie. a menubar in <code>menubar.html</code>) into other app templates, through the <a href="https://docs.djangoproject.com/en/1.11/ref/templates/builtins/#include" rel="nofollow noreferrer"><code>include</code></a> tag. It has some defined <strong>css</strong> and <strong>js</strong> functionality, stored in respective <code>menubar.css</code>|<code>menubar.js</code> files.</p>
  
  <p>Is seems much more convenient to contain links to these files within the <code>menubar.html</code> file, as shown below:</p>
  
  <pre><code>//At the Start
  &lt;link rel="stylesheet" href="{% static '&lt;appname&gt;/css/menubar.css' %}" /&gt;
  
  //.... other menubar HTML
  
  //At the End
  &lt;script src="{% static '&lt;app_name&gt;/js/menubar.js' %}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I'm worried this isn't good practise, because the template will be loaded with the <strong>css</strong> not located in <code>HEAD</code> and <strong>js</strong> not located at the end of <code>BODY</code>. 
  These are described as the <a href="https://stackoverflow.com/questions/6625773/where-should-i-put-the-css-and-javascript-code-in-an-html-webpage">standard HTML practises</a>. </p>
  
  <p>The clear alternative is to link the <strong>css</strong> or <strong>js</strong> in every template that I include the subtemplate, but this seems tedious.</p>
  
  <p>I know there is also the possibility of extending a template, however I believe the same issues occur  with css/js usage.</p>
  
  <p>What's best?</p>