-
Notifications
You must be signed in to change notification settings - Fork 1
Mako templating with Flask.
License
AnIrishDuck/flask-mako-legacy
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
** NOTE: This codebase is now deprecated. I've decided to fork benselme's extension and update that in the interest of maintaining a common code base. See https://github.com/AnIrishDuck/flask-mako ** A simple extension that integrates Mako template rendering into Flask applications. Usage:: # Set the template directory. This can also be a list of directories. app.config['MAKO_TEMPLATE_DIR'] = 'templates/' # These parameters are optional. app.config['MAKO_CACHE_DIR'] = 'cache/' app.config['MAKO_CACHE_SIZE'] = 200 mako = MakoTemplates(app) @app.route('/') def index(): return mako.render("index.tpl", message="hello") The template rendering functionality is designed to be as similar to the built-in Jinja2 behavior as possible. Thus, the same parameters (``url_for``, ``request``, ``context``, etc) will be set by default. Other features, such as custom ``context_processor`` hooks and the ``template_rendered`` signal, will also work. For more in-depth examples see the ``tests/`` and ``examples/`` directories. To run the bundled tests: ``python setup.py test``.
About
Mako templating with Flask.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published