form="""
<textarea>%s</textarea>
"""
I am trying to make a post request using the textarea input, and show the post input in the textarea again and I am able to do that.
But, my problem is in the beginning when I first go to see the page, I see the %s in the textarea box. How do I hide the %s? I am using the old python, I think it is 2.7
form="""
<form method="post">
<textarea name="text">%s</textarea>
<br>
<input type="submit">
</form>
"""
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.write(form)
def post(self):
foo="posted to the box"
self.response.write(form %foo)
app = webapp2.WSGIApplication([('/', MainPage)], debug=True)
Try following code