Cheetah is an open source template engine and code generation tool.
yelp_cheetah is cheetah with everything we don't / shouldn't use removed.
We really recommend that you don't choose cheetah for new projects, and certainly not this hacked fork. If you're already using cheetah in a legacy project though, you might(?) find this useful.
For a high-level introduction to Cheetah please refer to the User's Guide at http://cheetahtemplate.org/learn.html
- Before hacking
- Correct dependencies
- Removed Cheetah Analyzer
- Removed textmate highlight support
- Remove logging of placeholders
- Remove Django support
- Make useAutoCalling default to False
- Remove
#cache
directive - Remove Mondo
- Remove RecursiveNull
- Remove SiteHierarchy
- Remove turbocheetah
- Remove Servlet
- Remove silent placeholders (
$!placeholder
) - Remove
#errorCatcher
directive - Remove WebWare support
- Remove FileUtils
- Remove hasName
- Remove Indenter
- Remove
#indent
directive - Remove cheetah eval
c'$var'
syntax - Remove import hook, live compiling, compilation cache
- Remove CheetahWrapper
- Remove
#I18n
macro - Improve cmdline interface
- Remove several magical imports (
time
,currentTime
, etc.) - Remove
#unicode
directive - Remove
#breakpoint
directive - Remove
#unless
directive - Remove
#repeate
directive - Remove
#capture
directive - Improve compiling interface. There are now three functions: (
compile_source
,compile_file
,compile_to_class
) - Remove
#defmacro
directive - Remove
#include
directive - Remove
getFileContents
- Remove preprocessors
- Remove
addSrcTimeToOutput
setting - Remove
disabledDirectives
setting - Remove
pre
/post
ParseDirective
hooks - Remove placeholder hooks
- Remove expression hooks
- Remove
I18NFunctionName
- Remove
EmptySingleLineMethods
setting - Remove
allowWhitespaceAfterDirectiveStartToken
- Remove
templateMetaclass
setting - Require
unicode
for compiling source - Remove
#transform
directive - Remove
Websafe
,Markdown
,CodeHighlight
,Maxlen
,Strip
filters - Remove aliases for
BaseFilter
- Remove
namespaces
argument forTemplate
constructor - Remove
#stop
directive - Remove
useFilters
setting (always True) - Remove
allowPlaceholderFilterArgs
setting - Remove
encoding
setting - Remove
EOLSlurp
feature - Remove
#raw
directive - Remove C implementation of filters
- Remove
outputMethodsBeforeAttributes
setting - Remove
defDocStrMsg
setting - Remove
handlerForExtendsDirective
setting - Remove
__str__
from all objects - Remove support for pypy (Delete python implementation of NameMapper)
- Remove
useStackFrames
setting - Remove
#importsettings
directive - Remove
#compiler-settings python
directive - Remove
safeConvert
- Remove
*
imports - Raise on searchlist collisions
- Fix bug with macros causing out-of-bounds when near end of source
- Raise on unknown macros
- Remove
#echo
directive - Remove
#* ... *#
multiline comment syntax - Remove version checking code
- Remove
#arg
directive - Remove
#closure
directive - Make compilation output deterministic
- Make
<% ... %>
- Remove ability to specify argspecs in
#implements
- Remove multiple inheritance from
#extends
- Remove
#compiler
directive - Remove global imports: (
sys
,os
,os.path
, 'builtin, 'getmtime
,exists
,types
) - Default
useDottedNotation
to false - Remove
allowNestedDefScopes
setting - Remove
useSearchList
setting - Remove
useKWsForPassingTrans
setting - Remove
alwaysFilterNone
setting - Remove cheetah ternary
#if ... then ... else ...
directive - Remove
namespace
argument from Template.init - Support Python 3
- Expose a global
__YELP_CHEETAH__ = True
in compiled source - Remove
autoImportForExtends
setting (always True) - Disable
#extends
of an imported name - Add setting
future_unicode_literals
for togglingunicode_literals
in compiled source
- Rename
Cheetah.Compiler
andCheetah.Parser
toCheetah.legacy_compiler
andCheetah.legacy_parser
- Remove
#encoding
directive, cheetah source is now invariantelyUTF-8
- Add
Cheetah.partial_template
, a system for importable template functions.
- Make filters simple functions instead of classes
- Add and make default
markupsafe
filter
- Add
#with
directive - 100% test coverage
- Add
compile_directories
- Disallow dollarsigns on
#def
/#block
name - Disallow dollarsigns in function signatures
- Require argspec for
#def
- Requres no argspec for
#block
- Require no dollarsign in
#set
lvalue - Disallow dollarsigns in macro arguments
- Disallow dollarsigns in
#attr
lvalue - Forbid
@classmethod
/@staticmethod
- Remove
#set module
directive - Add testing infrastructure for partial template testing
- Fix partial template testing infrastructure
cheetah-compile
takes directories
- dep argparse
- Invariantly create
__init__.py
in subdirectories
- Do not create
__init__.py
in__pycache__
directories
- Remove dollarsigns on
for
lvalues