Flask/project_name/ext/webui/__init__.py
Simon Diesenreiter 5efd61d236
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Failing after 1m29s
Rename the project from template / rename-project (push) Has been skipped
CI / tests_linux (ubuntu-latest, 3.9) (push) Has been skipped
initial commit
2024-11-10 07:27:36 -08:00

17 lines
467 B
Python

from flask import Blueprint
from .views import index, only_admin, product, secret
bp = Blueprint("webui", __name__, template_folder="templates")
bp.add_url_rule("/", view_func=index)
bp.add_url_rule(
"/product/<product_id>", view_func=product, endpoint="productview"
)
bp.add_url_rule("/secret", view_func=secret, endpoint="secret")
bp.add_url_rule("/only_admin", view_func=only_admin, endpoint="onlyadmin")
def init_app(app):
app.register_blueprint(bp)