Files

20 lines
512 B
Python

from flask import Blueprint, render_template, request
from web.services.narrative_service import NarrativeService
bp = Blueprint('awards', __name__, url_prefix='/awards')
@bp.route('/')
def index():
award_type = request.args.get('type')
return render_template(
'awards/index.html',
awards=NarrativeService.list_awards(award_type),
leaderboard=NarrativeService.get_award_summary(),
award_type=award_type,
award_types=NarrativeService.AWARD_TYPE_LABELS,
)