Hyperfast and lightweight templating for the Python platform.

# Mako 0.7.0 Documentation

Search:
Release: 0.7.0

# Table of Contents

- Usage
  - Basic Usage
  - Using File-Based Templates
  - Using TemplateLookup
  - Using Unicode and Encoding
  - Handling Exceptions
  - Common Framework Integrations
  - API Reference
- Syntax
  - Expression Substitution
  - Expression Escaping
  - Control Structures
  - Comments
  - Newline Filters
  - Python Blocks
  - Module-level Blocks
  - Tags
  - Returning early from a template
- Defs and Blocks
  - Using Defs
  - Using Blocks
- The Mako Runtime Environment
  - Context
  - The Loop Context
  - All the built-in names
  - API Reference
- Namespaces
  - Ways to Call Namespaces
  - Namespaces from Regular Python Modules
  - Declaring defs in namespaces
  - The “body()” method
  - Built-in Namespaces
  - Inheritable Namespaces
  - API Reference
- Inheritance
  - Nesting Blocks
  - Rendering a named block multiple times
  - But what about defs ?
  - Using the “next” namespace to produce content wrapping
  - Using the “parent” namespace to augment defs
  - Inheritable Attributes
- Filtering and Buffering
  - Expression Filtering
  - Filtering Defs and Blocks
  - Buffering
  - Decorating
- The Unicode Chapter
  - Specifying the Encoding of a Template File
  - Handling Expressions
  - Defining Output Encoding
  - Saying to Heck with it: Disabling the usage of Unicode entirely
- Caching
  - Cache arguments
  - Programmatic Cache Access
  - Cache Plugins
  - API Reference

## Indices and tables

- Index
- Search Page

Website content copyright © by Michael Bayer. All rights reserved. Mako and its documentation are licensed under the MIT license. mike(&)zzzcomputing.com