summaryrefslogblamecommitdiffstats
path: root/nfsw/epilogue.py
blob: 2c70b18c4b2cd30e425347d5c90935717ecfc3b5 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                      
                              

 















                                                 




                                      
                                           
# -*- coding: utf-8 -*-
#
#   SPDX-License-Identifier: ISC
#
#   Copyright (C) 2019 rsiddharth <s@ricketyspace.net>
#
#   This file is part of nfsw.
#

from nfsw.auth import login_required
from nfsw.redis import redis


from flask import (
    Blueprint, render_template, redirect, url_for
)

bp = Blueprint('epilogue', __name__)


@bp.route('/epilogue', endpoint='epilogue')
@login_required
def epilogue():
    r = redis()

    if r.exists('epilogue:done'):
        return redirect(url_for('io'))

    r.set('epilogue:done', 1)

    return render_template('epilogue.html')