Moved alerts to the bottom middle of every page

This commit is contained in:
2024-01-05 21:40:32 +00:00
parent 2cf3fc9fbf
commit 8702aa86a5
5 changed files with 64 additions and 49 deletions

View File

@ -1,10 +1,11 @@
from flask import Blueprint
from flask import render_template, redirect, request, session, flash
from flask import render_template, request, session, flash
from controllers.database.product import ProductController
blueprint = Blueprint("products", __name__, url_prefix="/products")
# Loads the front product page
@blueprint.route('/')
def index():
database = ProductController()
@ -14,4 +15,15 @@ def index():
if products == None:
flash("No Products available")
return render_template('index.html', content="content.html", user = session.get('user'), products = products)
return render_template('index.html', content="content.html", user = session.get('user'), products = products)
# Loads a given product category page
@blueprint.route('/<string:category>')
def category(category: str):
return "Category: " + category
# Loads a given product based on ID
@blueprint.route('/<int:id>')
def id(id: int):
return "ID: " + str(id)