title: Flask Blueprint can't find static folder
body: <p>I've set up a Blueprint in my Flask application, but I can't seem to get my static folder to work. I keep getting 404 errors when it tries to reach them:</p>
  
  <pre><code>127.0.0.1 - - [11/Sep/2014 15:14:20] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 -
  127.0.0.1 - - [11/Sep/2014 15:14:20] "GET /static/static/css/bootstrap.min.css HTTP/1.1" 404 -
  </code></pre>
  
  <p>The css one also appends static twice. The JS has the correct /static but doesn't seem to work. Right now, my static folder is in the blueprint root path (<code>app/dashboard</code>). I tried putting it into <code>app/static</code> but I get the same exact errors.</p>
  
  <p>I have the following set up:</p>
  
  <p><code>app/dashboard/__init__.py</code>:</p>
  
  <pre><code>from flask import Blueprint
  dashboard = Blueprint('dashboard', __name__, template_folder='templates', static_folder='static')
  from application.dashboard import controllers
  </code></pre>
  
  <p><code>app/__init__.py</code>:</p>
  
  <pre><code># Blueprints      
  from flask import Blueprint
  from application.dashboard import dashboard
  app.register_blueprint(dashboard)
  </code></pre>
  
  <p>In <code>app/templates/layout.html</code>, I have a line that references two static files as follows:</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="{{ url_for('dashboard.static', filename='css/bootstrap.min.css') }}"&gt;
  &lt;script src="{{ url_for('dashboard.static', filename='js/bootstrap.min.js') }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>My <code>app/dashboard/static</code> directory:</p>
  
  <pre><code>$ tree application/dashboard/static/
  application/dashboard/static/
  ├── css
  │   ├── bootstrap-theme.css
  │   ├── bootstrap-theme.css.map
  │   ├── bootstrap-theme.min.css
  │   ├── bootstrap.css
  │   ├── bootstrap.css.map
  │   └── bootstrap.min.css
  ├── fonts
  │   ├── glyphicons-halflings-regular.eot
  │   ├── glyphicons-halflings-regular.svg
  │   ├── glyphicons-halflings-regular.ttf
  │   └── glyphicons-halflings-regular.woff
  └── js
      ├── bootstrap.js
      └── bootstrap.min.js
  </code></pre>
  
  <p>Any idea what is going on here? How can I structure my Blueprint properly? I've followed the instructions on the Flask documentation and I get this error.</p>
  
  <p>Thank you.</p>