Hyperfast and lightweight templating for the Python platform.

# Mako 0.7.2 Documentation

Search:
Release: 0.7.2

# 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