I am using Google app engine and I want to redirect to another page with a parameter when a form submited.
Here is the first form:
<form method="post" class="form-inline pull-left">
<div class="input-append">
<input type="text" required name="askquestion" class="span5"/>
<button type="submit" name="askbutton" class="btn-u" value="askbutton">Ask</button>
</div>
</form>
And here the backend:
askbutton = self.request.get("askbutton")
if askbutton:
title = self.request.get("askquestion")
self.render("makeaquestion.html",title=title)
I have already tried another one:
self.redirect("/makeaquestion?title='%s'"%title)
The first one render the new html and pass the parameter but the url stay the same as before. The second one redirect to the new url but without passing the parameter.