There was no answer to this question at Stackoverflow.

http://stackoverflow.com/questions/7456670/how-do-i-add-search-parameters-to-search-page-url

This is the form:

self.response.out.write("""
<form name="search_form" action="/searchhandler" method="post"><br />
<input type="text" name="search_string" size=40>
<input type="submit" value="search tags">
</form>""")

and this is the SearchHandler:

class SearchHandler(webapp.RequestHandler):
    def post(self):
...

s = filter(None,
f1.striplist(self.request.get("search_string").split("
")))
n = len(s)

if n==1:
    query = Main.all()
    query.filter("tag_list", s[0])
    query.order("-total_value")

    f1.display(query, self) #a function that displays the search
results
...

In SearchHandler I checked and

self.request.get("search_string")

correctly gives the search string but I could not figure out how to
put that in the url like

/searchhandler?search_string=[search string]

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to