diff --git a/kanken_online/__init__.py b/kanken_online/__init__.py index 93dcab7..ce7d027 100644 --- a/kanken_online/__init__.py +++ b/kanken_online/__init__.py @@ -62,17 +62,14 @@ def create_app(test_config=None): def kotoba_page(kotoba: str): return render_template("kotoba.html", kotoba=kotoba) - @app.route("/search") - def search_page(): - return render_template("search.html") - from . import database database.initialize_app(app) - from . import auth, api, forum + from . import auth, api, forum, search app.register_blueprint(auth.blueprint) app.register_blueprint(api.blueprint) app.register_blueprint(forum.blueprint) + app.register_blueprint(search.blueprint) from . import lang diff --git a/kanken_online/search.py b/kanken_online/search.py new file mode 100644 index 0000000..fcb5bb9 --- /dev/null +++ b/kanken_online/search.py @@ -0,0 +1,7 @@ +from flask import Blueprint, render_template + +blueprint = Blueprint("search", __name__, url_prefix="/search") + +@blueprint.route("/") +def search_page(): + return render_template("search.html")