From bb2e64a91627fbcb0ab615b161c3e78832ca7f3a Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 21 Sep 2019 18:27:17 -0400 Subject: nfsw/io.py: Add preprocess. --- nfsw/io.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nfsw/io.py b/nfsw/io.py index 9240759..3529bd0 100644 --- a/nfsw/io.py +++ b/nfsw/io.py @@ -6,6 +6,17 @@ from flask import ( bp = Blueprint('io', __name__) + +def preprocess(view): + @functools.wraps(view) + def wrapped_view(**kwargs): + setup() + + return view(**kwargs) + + return wrapped_view + + @bp.route('/io', endpoint='io') @login_required def io(): -- cgit v1.2.3