def post(self, keywords): keywords = self.request.arguments['terms'][0] DBQ.logTerms(self.request.remote_ip, keywords) commits = DBQ.findByKeywordsAndFulltext(keywords) template = env.get_template('searchresults.html') html = template.render(commits=commits, rsssearchparams=keywords) self.write(html) return
def get(self, keywords): commits = [] if not keywords: template = env.get_template('search.html') else: DBQ.logTerms(self.request.remote_ip, keywords) commits = DBQ.findByKeywordsAndFulltext(keywords) template = env.get_template('searchresults.html') html = template.render(commits=commits, rsssearchparams=keywords) self.write(html) return