mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 19:29:58 +00:00
Automatic services added to dashboard
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from flask import Blueprint, render_template
|
||||
from flask_login import login_required # type: ignore
|
||||
from application.dash.models import Service
|
||||
|
||||
dash_blueprint = Blueprint("dash", __name__, template_folder="templates")
|
||||
|
||||
@@ -9,4 +10,5 @@ dash_blueprint = Blueprint("dash", __name__, template_folder="templates")
|
||||
@dash_blueprint.route("/", methods=["GET", "POST"])
|
||||
@login_required
|
||||
def index():
|
||||
return render_template("dashboard.html")
|
||||
services = Service.query.all() # type: ignore
|
||||
return render_template("dashboard.html", services=services)
|
||||
|
||||
Reference in New Issue
Block a user