17 lines
547 B
Python
17 lines
547 B
Python
from flask import Blueprint, render_template, request
|
|
|
|
blueprint = Blueprint("search", __name__, url_prefix="/search")
|
|
|
|
def search_results(args: dict):
|
|
class renderable:
|
|
def render(self):
|
|
return "ok"
|
|
results = [renderable(), renderable()] # Do something with args
|
|
return render_template("search/search_results.html", results=results, value=args["keywords"])
|
|
|
|
@blueprint.route("/")
|
|
def search_page():
|
|
if request.args:
|
|
return search_results(request.args)
|
|
return render_template("search/search.html")
|