Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting display after form post submission in Google App Engine in Python
    primarykey
    data
    text
    <p>Content of page not displayed after a form post, but displayed when directly viewing the page. I have a Python App Engine piece of code that is attempting to direct to a new page and display a programatically defined (i.e. in the code, not html) piece of text. However up pressing the submit button of the form I get a blank page and no error messages.</p> <p>I've been using the Google App engine code examples. The form just just takes some options, but I'm not even collecting anything from it and should go to the new page, however it does not and I cannot find out where it might be going wrong.</p> <p>I have</p> <pre><code>class MainPage(webapp.RequestHandler): def get(self): path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values)) </code></pre> <p>and</p> <pre><code>class Confirm(webapp.RequestHandler): def post(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('You have confirmed!') application = webapp.WSGIApplication( [('/', MainPage), ('/confirm', Confirm)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main() </code></pre> <p>and in the HTML: index.html</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;form action="/confirm" method="post"&gt; &lt;div&gt;&lt;textarea name="content" rows="3" cols="60"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="submit" value="Submit"&gt;&lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I want to know why if I submit the form, I do not get the You have confirmed! message, but if I go to /confirm I do. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload