StarfallBot/starfall/web/blueprints/home.py

15 lines
477 B
Python

from flask import Blueprint, render_template
from flask_assets import Environment
from starfall.web.blueprints.base import BaseBlueprint
class HomeBlueprint(BaseBlueprint):
def __init__(self, blueprint: Blueprint, assets: Environment) -> None:
super().__init__(blueprint, assets)
blueprint.add_url_rule("/", view_func=self.index)
def index(self):
self._log_access()
return render_template("home.html", assets=self.assets, route="/")