From ad5b3117fdce673c232371c07ae563c696d4b083 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Mon, 17 May 2021 21:48:12 +0200 Subject: [PATCH] Added admin index template --- advlabdb/__init__.py | 5 ++++- advlabdb/templates/admin_index.html | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 advlabdb/templates/admin_index.html diff --git a/advlabdb/__init__.py b/advlabdb/__init__.py index ee302dd..956d044 100644 --- a/advlabdb/__init__.py +++ b/advlabdb/__init__.py @@ -23,7 +23,10 @@ app.config["DEBUG_TB_INTERCEPT_REDIRECTS"] = False #DEBUG DebugToolbarExtension(app) #DEBUG from advlabdb import customClasses -admin = Admin(app, name="Admin@AdvLabDB", template_mode='bootstrap3', index_view=customClasses.SecureAdminIndexView()) +admin = Admin(app, + name="Admin@AdvLabDB", + template_mode="bootstrap3", + index_view=customClasses.SecureAdminIndexView(template="admin_index.html")) from advlabdb import models diff --git a/advlabdb/templates/admin_index.html b/advlabdb/templates/admin_index.html new file mode 100644 index 0000000..bbe11ea --- /dev/null +++ b/advlabdb/templates/admin_index.html @@ -0,0 +1,7 @@ +{% extends "admin/index.html" %} + +{% block body %} + User's active semester: {{userActiveSemester(flashWarning=True).label}} +

Welcome back, commander!

+ {{super()}} +{% endblock %}