title: Flask blueprint static directory does not work?
body: <p><a href="http://flask.pocoo.org/docs/blueprints/#static-files" rel="noreferrer">According to the Flask readme</a>, blueprint static files are accessible at <code>blueprintname/static</code>. But for some reason, it doesn't work.</p>
  
  <p>My blueprint is like this:</p>
  
  <ul>
  <li><p><code>app/frontend/views.py</code> :</p>
  
  <pre><code>frontend = Blueprint('frontend', __name__, 
                       template_folder='templates',
                       static_folder='static')
  
  @frontend.route('/') etc...
  </code></pre></li>
  <li><p><code>app/frontend/js/app.js</code> : my javascript</p></li>
  <li>Blueprint registered in Flask app (routes work and everything)</li>
  </ul>
  
  <p>When I go to <code>abc.com/frontend/static/js/app.js</code>, it just gives a 404.</p>
  
  <p>When I follow the Flask readme to get my static files:</p>
  
  <pre><code>&lt;script src="{{url_for('frontend.static', filename='js/app.js')}}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>&lt;script src="/static/js/app.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Which doesn't work either. There's nothing in my root <code>app/static/</code> folder.</p>
  
  <p>I can't access any static files in my blueprint! Flask read me says that it should work!</p>
  
  <blockquote>
  <pre><code>admin = Blueprint('admin', __name__, static_folder='static')
  </code></pre>
    
    <p>By default the rightmost part of the path is where it is exposed on the web. Because the folder is called static here it will be available at the location of the blueprint + /static. Say the blueprint is registered for /admin the static folder will be at /admin/static.</p>
  </blockquote>