14 lines
361 B
Python
14 lines
361 B
Python
from flask import Blueprint, abort, render_template
|
|
|
|
from ..models import Display
|
|
|
|
bp = Blueprint("display", __name__, url_prefix="/display")
|
|
|
|
|
|
@bp.get("/<token>")
|
|
def display_player(token: str):
|
|
display = Display.query.filter_by(token=token).first()
|
|
if not display:
|
|
abort(404)
|
|
return render_template("display/player.html", display=display)
|