title: Error when linking CSS to flask
body: <p>I'm trying to link some CSS ive written into to single page application but when I run it through CMDER it keeps giving me a 404 error.</p>
  
  <p>My App</p>
  
  <p><strong>webapp.py</strong></p>
  
  <p><strong>static folder</strong></p>
  
  <p>--index.html</p>
  
  <p>--css
      ---theme.css</p>
  
  <p>--images
    ---hudson1.jpg</p>
  
  <p><strong>templates</strong></p>
  
  <p>--newyork.html</p>
  
  <pre><code>127.0.0.1 - - [28/Nov/2016 10:08:10] "GET /%7B%7B%20url_for('static',%20filename='css/theme.css')%20%7D%7D HTTP/1.1" 404
  </code></pre>
  
  <p>This is the error I get.
  Here is my code.</p>
  
  <p>Index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
  $("#newyorkbutton").click(function(){
  $.get("/newyork", function(data, status){
  $("#city").html(data);
  });
  });
  });
  &lt;/script&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;A Blog ABout My Travels&lt;/title&gt;
  &lt;link rel= "stylesheet" type= "text/css" href= "{{ url_for('static', filename='css/theme.css') }}"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div id="mainPicture"&gt;
          &lt;div class="picture"&gt;
              &lt;div id="headerTitle"&gt;Places I've Been&lt;/div&gt;
              &lt;div id="headerSubtext"&gt;A Blog About My Travels&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="page"&gt;
          &lt;input type="submit" name="NewYork" id="newyorkbutton" value="New York"&gt;
  &lt;/div&gt;
  &lt;div id="city" class="contentBox"&gt;
          &lt;div class="innerBox"&gt;
              &lt;h2&gt;Welcome to My Travels&lt;/h2&gt;
            &lt;div class="contentText"&gt;&lt;p&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum..&lt;/p&gt;&lt;br /&gt;
          &lt;p&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum..&lt;/p&gt;&lt;/div&gt;        
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my newyork.html:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;head&gt;
  &lt;title&gt;New York&lt;/title&gt;
  &lt;link rel="stylesheet" href="{{ url_for('static', filename='css/theme.css') }}"&gt;
  &lt;/head&gt;
  &lt;div class="innerBox"&gt;
  &lt;h2&gt;New York&lt;/h2&gt;       
  &lt;div class="contentText"&gt;&lt;p&gt;
      New York is a state in the northeastern United States, and is the 27th-most extensive, fourth-most populous, and seventh-most densely populated U.S. state. New York is bordered by New Jersey and Pennsylvania to the south and Connecticut, Massachusetts, and Vermont to the east. The state has a maritime border in the Atlantic Ocean with Rhode Island, east of Long Island, as well as an international border with the Canadian provinces of Quebec to the north and Ontario to the west and north. 
  &lt;/p&gt;
  &lt;img src="{{ url_for('static', filename='images/newyork1.jpg') }}" alt="New York" style="width:750px;height:350px;"&gt;
  &lt;p&gt;
      The state of New York, with an estimated 19.8 million residents in 2015, is often referred to as New York State to distinguish it from New York City, the state's most populous city and its economic hub. With an estimated population of 8.55 million in 2015, New York City is the most populous city in the United States and the premier gateway for legal immigration to the United States. The New York City Metropolitan Area is one of the most populous urban agglomerations in the world. New York City is a global city, exerting a significant impact upon commerce, finance, media, art, fashion, research, technology, education, and entertainment, its fast pace defining the term New York minute. 
  &lt;/p&gt;&lt;/div&gt; 
  &lt;/div&gt; 
  </code></pre>
  
  <p>And my webapp.py:</p>
  
  <pre><code>from flask import Flask, render_template, request
  
  app = Flask(__name__)  
  
  @app.route("/")
  def root():
      return app.send_static_file('index.html')
  
  @app.route("/newyork") 
  def newyork(): 
      return render_template('newyork.html')
  
  if __name__ == "__main__":     
      app.run()
  </code></pre>