<div id="whitedivider">
</div>
<div id ="searchform">
<form method=post action="">
Check the buttons to search for the exact phrase.
<br>Title:
<input type="text" name="title" value="" size="50">
<input type="checkbox" name="exacttitle" value=""></br>
<br>Url:
<input type="text" name="url" value="" size="50">
<input type="checkbox" name="exacturl" value=""></br>
<br>Tags:
<input type="text" name="tags" value="" size="50">
<input type="checkbox" name="exacttags" value=""></br>
<br>
<input type="submit" value="Find podcasts!"></br>
</form>
<a href="http://localhost:8080/">
Back to mainpage.
</a>
</div>
class search:
def GET(self):
return render.searchpage()
def POST(self):
searchTerms = web.input()
if searchTerms.has_key("exacttitle"): return render.blah()
titles = B.query("select * from episodes where title ~* '%s'"
% searchTerms['title'])
urls = B.query("select * from episodes where url ~* '%s'" %
searchTerms['url'])
tags = B.query("select * from episodes where tags ~* '%s'" %
searchTerms['tags'])
queryresults = set(IT.chain(titles, urls, tags))
return render.results(searc
so ir seems the checkboxes dont come with webinput, how do I get the
hold of them?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---