title: Changing default url to static-media in Flask
body: <p>I've made a website using <a href="http://flask.pocoo.org/">Flask</a> and I have no problems getting things to work properly on the built-in development server. I've also been able to get things running on my production server under mod_wgsi. However, I host my static media from a <a href="http://docs.webfaction.com/software/static.html">static/CGI/PHP-5.2</a> application and I can't get Flask to 'see' it without manually changing all the urls in my html files.</p>
  
  <p>The problem seems to be that the basic Flask setup expects static files to be within the flask application. See <a href="http://flask.pocoo.org/docs/quickstart/#static-files">here</a> for details.  Essentially, I think I need to change the url of 'static' portion of the following one liner:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="{{url_for('static', filename='css/print.css')}}" type="text/css" media="print"/&gt; 
  </code></pre>
  
  <p>It looks like I can change this in <strong>init</strong>.py, instructions <a href="http://flask.pocoo.org/docs/api/#application-object">here</a>, but defining the static_path as follows doesn't seem to work.</p>
  
  <pre><code>app = Flask(__name__, static_path = '/web_media')
  </code></pre>
  
  <p>To be clear, if I manually define my url like this:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="/web_media/css/print.css" type="text/css" media="print"/&gt;
  </code></pre>
  
  <p>everything works fine.  Any help would be greatly appreciated.</p>