feat(routes/index.py): add index.py route blueprint
This commit is contained in:
20
src/judas_server/web/routes/index.py
Normal file
20
src/judas_server/web/routes/index.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import annotations
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
import flask
|
||||||
|
import flask_login
|
||||||
|
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from werkzeug.wrappers import Response
|
||||||
|
|
||||||
|
index_bp: flask.Blueprint = flask.Blueprint("index", __name__)
|
||||||
|
|
||||||
|
|
||||||
|
@index_bp.route("/")
|
||||||
|
def index() -> Response | str:
|
||||||
|
"""Renders the index page."""
|
||||||
|
return flask.render_template(
|
||||||
|
"index.html", logged=flask_login.current_user.is_authenticated
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user