Create the template for the Flask framework
This commit is contained in:
parent
db65646400
commit
c0f9876184
14 changed files with 266 additions and 0 deletions
11
app/routes/customer.py
Normal file
11
app/routes/customer.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue