google app engine - Python jinja2 redirect with passing a parameter -


i using google app engine , want redirect page parameter when form submited.

here 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 backend:

askbutton = self.request.get("askbutton") if askbutton:   title = self.request.get("askquestion")   self.render("makeaquestion.html",title=title) 

i have tried one:

self.redirect("/makeaquestion?title='%s'"%title) 

the first 1 render new html , pass parameter url stay same before. second 1 redirect new url without passing parameter.

set action attribute of form:

<form action="/makequestion" 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> 

this submit post request (with filled-in data) /makequestion


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -