Add blueprint scaffold for timer functions

This commit is contained in:
Peter Stockings
2025-02-16 13:45:34 +11:00
parent 9d48bbd285
commit 699ee50229
6 changed files with 162 additions and 9 deletions

17
routes/timer.py Normal file
View File

@@ -0,0 +1,17 @@
from flask import Blueprint, render_template, redirect, url_for, flash
from jinja2_fragments import render_block
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import login_user, login_required, logout_user
from extensions import db, htmx, environment
timer = Blueprint('timer', __name__)
@timer.route('/overview')
@login_required
def overview():
if htmx:
return render_block(environment, 'dashboard/timer_functions/overview.html', 'page')
return render_template('dashboard/timer_functions/overview.html')