Multiple Pages
|
One Page
Mako Documentation
Version: 0.3.4 Last Updated: 06/22/10 17:39:23
Table of Contents
Basic Usage
Using File-Based Templates
Using TemplateLookup
Setting the Collection Size
Setting Filesystem Checks
Using Unicode and Encoding
Handling Exceptions
Common Framework Integrations
Turbogears/Pylons Plugin
WSGI
Pygments
Babel (Internationalization)
Syntax
Expression Substitution
Expression Escaping
Control Structures
Comments
Newline Filters
Python Blocks
Module-level Blocks
Tags
<%page>
<%include>
<%def>
<%namespace>
<%inherit>
<%namespacename:defname>
<%call>
<%doc>
<%text>
Returning early from a template
Defs
Calling defs from Other Files
Calling defs programmatically
Defs within Defs
Calling a def with embedded content and/or other defs
The Mako Runtime Environment
Context
The Buffer
Context Variables
Context Methods and Accessors
All the built-in names
Namespaces
Ways to Call Namespaces
Namespaces from Regular Python Modules
Declaring defs in namespaces.
The "body()" method
Namespace methods and properties
Built-in Namespaces
local
self
Inheritable Namespaces
Inheritance
Using the "next" namespace to produce content wrapping
Using the "parent" namespace to augment defs
Inheritable Attributes
Filtering and Buffering
Expression Filtering
The default_filters Argument
Turning off Filtering with the "n" filter
Filtering Defs
Buffering
Decorating
The Unicode Chapter
Specifying the Encoding of a Template File
Handling Expressions
Defining Output Encoding
Buffer Selection
Saying to Heck with it: Disabling the usage of Unicode entirely
Caching
Cache arguments
Accessing the Cache