If you use Cheetah, please support the project and register by clicking here:


7.8 #indent

This directive is not implemented yet. When/if it's completed, it will allow you to

  1. indent your template definition in a natural way (e.g., the bodies of #if blocks) without affecting the output
  2. add indentation to output lines without encoding it literally in the template definition. This will make it easier to use Cheetah to produce indented source code programmatically (e.g., Java or Python source code).

There is some experimental code that recognizes the #indent directive with options, but the options are purposely undocumented at this time. So pretend it doesn't exist. If you have a use for this feature and would like to see it implemented sooner rather than later, let us know on the mailing list.

The latest specification for the future #indent directive is in the TODO file in the Cheetah source distribution.

If you use Cheetah, please support the project and register by clicking here: