Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/frameworks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down