title: Configuring Flask to correctly load Bootstrap js and css files
body: <p>How can you use the "url_for" directive in Flask to correctly set things up so a html page that uses Bootstrap and RGraph works ?</p>
  
  <p>Say my html page looks like this (partial snippet) :-</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
              &lt;meta charset="utf-8"&gt;
              &lt;link href="scripts/bootstrap/dist/css/bootstrap.css" rel="stylesheet"&gt;
              &lt;title&gt;HP Labs: Single Pane Of Glass (Alpha)&lt;/title&gt;
              &lt;script src="scripts/RGraph/libraries/RGraph.common.core.js" &gt;&lt;/script&gt;
              &lt;script src="scripts/RGraph/libraries/RGraph.line.js" &gt;&lt;/script&gt;
              &lt;script src="scripts/RGraph/libraries/RGraph.common.effects.js" &gt;&lt;/script&gt;
              &lt;script src="scripts/RGraph/libraries/RGraph.line.js" &gt;&lt;/script&gt;
  
   ......
  
   &lt;/html&gt;
  </code></pre>
  
  <p>Here's what I've done/want to do :-</p>
  
  <ol>
  <li><p>Created a "templates" directory alongside my Flask module and placed this html file in it.</p></li>
  <li><p>Created a "static" directory alongside my Flask module but am unsure where and how many "url_for" type statements to use and where they should go. So currently the "scripts" directory is a sub-directory in the "templates" directory (I know this is incorrect).</p></li>
  <li><p>I'd like to be able to reference all the Bootstrap and RGraph js and css correctly (right now seeing lots of 404s).</p></li>
  </ol>
  
  <p>Can anyone direct me to correctly configure Flask (running the dev server) to do this ? Right now the js and css doesn't work.</p>
  
  <p>Thanks !</p>