mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
24 lines
563 B
Python
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'
|
|
)
|