nopaque/app/contributions/routes.py
2022-10-02 23:49:14 +02:00

24 lines
563 B
Python

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'
)