title: Not able to load static file CSS and JS thru pyBottle?
body: <p>Always getting 404 while trying to load static file using Bottle. I have referred stack overflow question and Google group chat but nothing is helping me to correct my problem. Please help me.. spent lot of time in this... </p>
  
  <pre><code>Tuts
     main.py
     static/
       bootstarp.css
     views/
       index.tpl
  </code></pre>
  
  <p><strong>main.py code</strong> <br></p>
  
  <pre><code>import bottle
  from bottle import Bottle
  from os.path import basename,abspath, dirname, join
  
  app = bottle.default_app()
  
  appPath = dirname(abspath(''))
  print appPath
  
  @bottle.route('/')
  def index():
      return bottle.template('index', dict(title=appPath,get_url=app.get_url))
  
  @bottle.route('/static/:filename#.*#', name='css')
  def server_static(filename):
      return bottle.static_file(filename, root=join(appPath,'static'))
  
  bottle.debug(True)
  bottle.run(host='localhost', port=8082,reloader=True)
  
  
  **Template:**
  
  &lt;link href="{{ get_url('css', filename='bootstrap.css') }}" rel="stylesheet" media="screen"&gt;
  </code></pre>