From a3c9d05655deae024708f96d1eb09791ed32c56a Mon Sep 17 00:00:00 2001 From: spollard Date: Sun, 14 Jun 2020 18:21:14 -0600 Subject: [PATCH] Fixed Flask integration Flask extensions have changed how they are organized. This updates the docs to work with current the current Flask package. --- docs/frameworks.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/frameworks.rst b/docs/frameworks.rst index 4cc2459..67332fa 100644 --- a/docs/frameworks.rst +++ b/docs/frameworks.rst @@ -28,15 +28,16 @@ settings dictionary. The default prefix is 'mako.'. Flask ====== -The following code snippet would get Flask working with plim: +First install the flask_mako package. The following code snippet would +get Flask working with plim: .. code-block:: python from flask import Flask - from flask.ext.mako import MakoTemplates, render_template + from flask_mako import MakoTemplates, render_template from plim import preprocessor - app = Flask(__name__) + app = Flask(__name__, template_folder='.') mako = MakoTemplates(app) app.config['MAKO_PREPROCESSOR'] = preprocessor @@ -47,6 +48,7 @@ The following code snippet would get Flask working with plim: if __name__ == "__main__": app.run(debug=True) + With hello.html in templates dir: .. code-block:: html