title: python bottle framework post redirect
body: <p>Im writing a simple front end webpage that would take a string of words and return a table of words count. For now i'm able to query the string and post the result on the same page. However, I want redirect and post the result on another page with should be @post(/'result')</p>
  
  <p>Below is my code, however, it keep giving me an error saying: Exception:</p>
  
  <pre><code>AttributeError  ("'NoneType' object has no attribute 'split'",)
  Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/bottle.py", line 862, in _handle
      return route.call(**args)
    File "/Library/Python/2.7/site-packages/bottle.py", line 1729, in wrapper
      rv = callback(*a, **ka)
    File "frontEnd.py", line 16, in result
    File "frontEnd.py", line 23, in query
      for word in keyString.split():
  AttributeError: 'NoneType' object has no attribute 'split'
  </code></pre>
  
  <p>what should I change so that I post the result table on the redirected page /result without causing an error?</p>
  
  <pre><code>@get('/')
  def search():
      return '''&lt;h1&gt;Search&lt;/h1&gt;&lt;form action="/" method="post"&gt; Keyword:&lt;input name="keywords"type="text"/&gt;&lt;input value="GO" type="submit" /&gt; &lt;/form&gt;'''
  
  @post('/')
  def do_search():
      redirect('/result')
  
  @post('/result')
  def result(wc,keyString):
      keyString = request.forms.get('keywords')
      wc = query(keyString)
      return wordCountHTML(wc,keyString)
  </code></pre>