title: Submitting a blank form to my website running on flask makes it return an internal server error
body: <p>I'm running my webserver in flask at <a href="http://numbersindia.com" rel="nofollow">NumbersIndia.com</a> . When I try to submit a balnk form the form at <a href="http://numbersindia.com/flask_hello_world.fcgi/track_mobile_numbers" rel="nofollow">http://numbersindia.com/flask_hello_world.fcgi/track_mobile_numbers</a> or the pincode form I get an internal server.
  Here is the code for pincode route.</p>
  
  <pre><code>@app.route('/find_pin_codes', methods=['POST','GET'])
  def pincodes():
      if request.method == 'POST':
          if request.form["number"] != "":
              number = request.form['number']
              number = number.replace(" ","")
              number = number.replace("-","")
              number = number.strip()
              strnumber = number
              try:
                  number = int(number)
                  num = pinCodes.query.filter_by(pincode = number).first()
                  return render_template('pincodes.html', pincode = "Pincode : "+strnumber, 
                                      officename = "Office name : "+num.officename,  
                                      taluk = "Taluk : "+num.taluk, 
                                      district ="District : "+ num.district,
                                      state = "State : "+num.state
                                      )
              except:
                  return render_template('pincodes.html', 
                                      pincode = "Pincode : "+strnumber, 
                                      officename = "Invalid pincode, try again")
          else:
              return render_template('pincodes.html', 
                                      pincode = "Pincode : "+strnumber, 
                                      officename = "Invalid pincode, try again")
  
      else:
          return render_template('pincodes.html')
  </code></pre>