mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
Added login functionality and login required
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user