I have a project and some URL functions,
admin_bp = Blueprint('admin', __name__) @admin_bp.route('/dashboard', methods=['GET', ]) @flask_login.login_required def dashboard(): context = {} page = 'admin/dashboard.html' return render_template(page, **context) @admin_bp.route('/deny', methods=['GET', ]) @flask_login.login_required def deny(): return 'hey bro you dont belong here'
I do not want to copy the @flask_login.login_required decorator insert for all url functions according to this plan. Is there a better way that I can apply a decorator to all drawings?
source share