title: Flask Build Error
body: <p>When I fill in the form I get this error, I dont see the flash message although its added it to my db:</p>
  
  <pre><code>werkzeug.routing.BuildError
  BuildError: ('/contacts', {}, None)
  </code></pre>
  
  <p>my methods:</p>
  
  <pre><code>@app.route('/contacts/', methods=['GET','POST'])
  def contact_list():
      cur = g.db.execute('select contact_id, surname, firstname from address order by surname')
      contacts = cur.fetchall()
      return render_template("contacts.html", contacts = contacts) #refer to template
  
  
  @app.route('/addcontact/', methods=['GET','POST'])
  def contact_add():
      if request.method == 'POST':
          g.db.execute('insert into address (surname, firstname, email, mobile) values (?, ?, ?, ?)',
                   [request.form['firstname'], request.form['surname'], request.form['email']
                  , request.form['mobile']])
          g.db.commit()
          flash('New entry was successfully posted')
          return redirect(url_for('/contacts')) #redirect to the contacts page
      elif request.method != 'POST':
          return render_template('addcontact.html')
  </code></pre>
  
  <p>My html:</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
        &lt;h1&gt;Add new contact&lt;/h1&gt;
    &lt;form action='/addcontact/' method="post"&gt;
      &lt;dl&gt;
        &lt;dt&gt;First Name:
        &lt;dd&gt;&lt;input type="text" size=30 name="firstname"&gt;
        &lt;dt&gt;Surname:
        &lt;dd&gt;&lt;input type="text" size=30 name="surname"&gt;
        &lt;dt&gt;Email:
        &lt;dd&gt;&lt;input type="text" size=30 name="email"&gt;
        &lt;dt&gt;Mobile:
        &lt;dd&gt;&lt;input type="text" size=30 name="mobile"&gt;            
        &lt;dd&gt;&lt;input type="submit" value="Add New Contact"&gt;
      &lt;/dl&gt;
    &lt;/form&gt;
    &lt;a href="/"&gt;Home&lt;/a&gt;
    &lt;a href="/contact"&gt;List of contacts&lt;/a&gt;
  </code></pre>
  
  <p>
  </p>