title: How can I redirect after POST in Pyramid?
body: <p>I'm trying to have my form submit to a route which will validate the data then redirect back to the original route.</p>
  
  <p>For example:</p>
  
  <ul>
  <li>User loads the page website.com/post</li>
  <li>Form POSTs the data to website.com/post-save</li>
  <li>User gets redirected back to website.com/post</li>
  </ul>
  
  <p>Pyramid is giving me some troubles doing this.</p>
  
  <p>Here's my slimmed down views.py</p>
  
  <pre><code>def _get_link_form(post_data):
      """ Returns the initialised form object """
  
      return LinkForm(post_data)
  
  def home_page(request):
  
      form = _get_link_form(request.POST)
      return {'form' : form}
  
  def save_post(request):
      """ form data is submitted here """"
  
      form = _get_link_form(request.POST)
  
      if not form.validate():
          return home_page(request, form)
  </code></pre>
  
  <p>This is the code I've been playing around with. Not only does it not work, it also feels messy and hacked up. Surely there's a simpler way to 'redirect after-POST' in Pyramid?</p>