from flask import Blueprint, render_template from flask_login import login_required, current_user bp = Blueprint('admin', __name__, template_folder='templates') @bp.route('/admin') @login_required def admin_dashboard(): if current_user.role != 'admin': return "Access denied", 403 return render_template('admin/admin_dashboard.html')