Moved alerts to the bottom middle of every page
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user