Add home dashboard and Mithril rendering support

- Create new home route with comprehensive dashboard statistics
- Implement Mithril rendering support with new `mithril_loader.html` template
- Add new routes for home and test pages in `app.py`
- Create `lib/mithril.py` with Mithril rendering and error handling utilities
- Update dashboard template to use new home route
- Add detailed dashboard view with timer and HTTP function statistics
This commit is contained in:
Peter Stockings
2025-02-20 23:35:46 +11:00
parent 24a0c0ffef
commit d4c0c0f262
9 changed files with 571 additions and 5 deletions

5
app.py
View File

@@ -11,6 +11,8 @@ from werkzeug.security import check_password_hash, generate_password_hash
import os
from dotenv import load_dotenv
from routes.timer import timer
from routes.test import test
from routes.home import home
# Load environment variables from .env file in non-production environments
if os.environ.get('FLASK_ENV') != 'production':
@@ -24,7 +26,10 @@ login_manager.init_app(app)
login_manager.login_view = "login"
jinja_partials.register_extensions(app)
init_app(app)
app.register_blueprint(timer, url_prefix='/timer')
app.register_blueprint(test, url_prefix='/test')
app.register_blueprint(home, url_prefix='/home')
class User(UserMixin):
def __init__(self, id, username, password_hash, created_at):