diff options
Diffstat (limited to 'web.py')
-rw-r--r-- | web.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -101,7 +101,7 @@ class MyHtmlFormatter(highlight.HtmlFormatter): return highlight.HtmlFormatter._format_fragment(self, text, fragment, seen) @app.route("/excerpt/<int:docnum>/<path:term>", methods=["GET"]) -def excerpt(docnum, term): +def do_excerpt(docnum, term): def generator(q): for result in searcher.search(q, limit=1, sortedby="pagenumber"): terms = [ text for fieldname, text in q.all_terms() @@ -168,4 +168,4 @@ def log_response(sender, response): 'Response: %s', response) if __name__ == "__main__": app.debug = True - app.run(host="0.0.0.0") + app.run(host="0.0.0.0", port=8000) |