| 1234567891011121314151617181920212223242526272829303132 | 
"""Serve static content"""import osfrom flask import render_template, Blueprint, abortfrom jinja2 import TemplateNotFoundfrom flask_login import current_userBLUEPRINT = Blueprint(    "static",    __name__,    template_folder='pages')@BLUEPRINT.route("/", defaults={"page": "index"})@BLUEPRINT.route("/<path:page>")def show(page):    """Display static page"""    if current_user.is_authenticated:        try:            return render_template("private/%s.html" % page)        except TemplateNotFound:            abort(404)    try:        return render_template("public/%s.html" % page)    except TemplateNotFound:        if os.path.exists("app/modules/static/pages/private/%s.html" % page):            abort(401)        abort(404)
 |