adaugat lab4 si lab5

Signed-off-by: hellisabove <robertnedela15@gmail.com>
This commit is contained in:
hellisabove
2026-05-25 11:13:40 +03:00
parent 8b7c9a5527
commit 35893a4012
78 changed files with 60025 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from flask import session, Blueprint, request, redirect, render_template
from ..model.sensors import fetch_iot_data
index_pages = Blueprint("index", __name__)
@index_pages.route("/")
def index_page():
if not session.get("auth", False):
return redirect("/login", code=302)
sensors = fetch_iot_data()
return render_template("index.html", sensors=sensors)
@index_pages.route("/contact")
def contact_page():
return render_template("contact.html")