Separate search into blueprint
This commit is contained in:
parent
469bf8dfd7
commit
eb3f685d75
@ -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
|
||||
|
||||
|
7
kanken_online/search.py
Normal file
7
kanken_online/search.py
Normal file
@ -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")
|
Loading…
Reference in New Issue
Block a user