Create the template for the Flask framework

This commit is contained in:
Charles Descamps 2025-06-03 16:50:03 -07:00
parent db65646400
commit c0f9876184
14 changed files with 266 additions and 0 deletions

11
app/routes/customer.py Normal file
View file

@ -0,0 +1,11 @@
from flask import Blueprint, render_template
from flask_login import login_required, current_user
from app.models import Customer
customer_bp = Blueprint('customer', __name__, url_prefix='/customers')
@customer_bp.route('/portal')
@login_required
def portal():
customer = Customer.query.filter_by(user_id=current_user.id).first_or_404()
return render_template('customers/portal.html', customer=customer)