Added login functionality and login required

This commit is contained in:
2025-05-31 12:05:53 +02:00
parent c30d32b10f
commit 1ac625ccbd
10 changed files with 251 additions and 79 deletions

View File

@@ -2,12 +2,13 @@ from flask import Blueprint, render_template, request, jsonify
from application.dashboard.models import AllowedPlate, LoggedItem
from application import db
from application.dashboard.forms import npForm
from flask_login import login_required
dash_blueprint = Blueprint("dash", __name__, template_folder="templates")
@dash_blueprint.route("/dashboard")
# @login_required
@login_required
def dashboard():
Plates = AllowedPlate.query.all()
logs = (
@@ -17,7 +18,7 @@ def dashboard():
@dash_blueprint.route("/add", methods=["GET", "POST"])
# @login_required
@login_required
def add():
Plates = AllowedPlate.query.all()
form = npForm()