INNER CODE UNIT · Python
build_app
Mailu/Mailu · setup/server.py:53
def build_app(path):
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
@app.context_processor
def app_context():
return dict(
versions=os.getenv("VERSIONS","master").split(','),
stable_version = os.getenv("stable_version", "master")
)
prefix_bp = flask.Blueprint(version.replace(".", "_"), __name__)
prefix_bp.jinja_loader = jinja2.ChoiceLoader([
jinja2.FileSystemLoader(os.path.join(path, "templates")),
jinja2.FileSystemLoader(os.path.join(path, "flavors"))
])