title: How to use Django variable in JavaScript file?
body: <p>I know that we can use Django variable in templates(html files) with {{variable}}, but how can I use a variable Django in a Javascript file that included in the template?</p>
  
  <p>For example here is my template.html:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="/static/youtube.js"&gt;&lt;/script&gt;
  ...
  </code></pre>
  
  <p>how can I use variable {{user.get_username}} in <strong>youtube.js</strong>? not in template.html cause I did't wrote my script here...and when I use  {{user.get_username}} in Javascript file youtube.js it caused an error "invalid token { ", but in the template it works fine.</p>
  
  <p>Thanks a lot!</p>