from flask import render_template from flask_login import login_required from app.decorators import permission_required from app.models import Permission from . import bp from .forms import ContributionForm @bp.before_request @login_required @permission_required(Permission.CONTRIBUTE) def before_request(): pass @bp.route('', methods=['GET', 'POST']) def contributions(): form = ContributionForm(prefix='contribution-form') return render_template( 'contributions/contribute.html.j2', form=form, title='Contribution' )