From 906da2401957bdd53e29b91afb11ade664b739ef Mon Sep 17 00:00:00 2001 From: DaanoGames Date: Tue, 15 Apr 2025 12:04:07 +0200 Subject: [PATCH] added link/service --- application/dash/templates/dashboard.html | 4 ++-- application/dash/views.py | 7 ++++++- application/templates/base_template.html | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/application/dash/templates/dashboard.html b/application/dash/templates/dashboard.html index ea51429..16176a6 100644 --- a/application/dash/templates/dashboard.html +++ b/application/dash/templates/dashboard.html @@ -6,8 +6,8 @@
{% for service in services%}
- name: {{service["name"]}}
- url: {{service["url"]}} + Name: {{service["name"]}}
+ URL: {{service["url"]}}
{% endfor %}
diff --git a/application/dash/views.py b/application/dash/views.py index fa75dbe..fa4929c 100644 --- a/application/dash/views.py +++ b/application/dash/views.py @@ -1,5 +1,5 @@ from flask import Blueprint, render_template -from application.dash.forms import RegisterForm +from application.dash.forms import RegisterForm, ServiceForm from flask_login import login_required # type: ignore from application.dash.models import Service from application.decorators import admin_required @@ -27,3 +27,8 @@ def admin(): check_admin = register_form.admin.data return render_template("admin.html", form=register_form) + +@dash_blueprint.route("/service", methods=["GET", "POST"]) +@login_required +def service(): + return render_template("add_service.html") diff --git a/application/templates/base_template.html b/application/templates/base_template.html index 8a77a90..a6e4bbb 100644 --- a/application/templates/base_template.html +++ b/application/templates/base_template.html @@ -28,7 +28,7 @@ Dashboard {% if current_user.is_admin %}