Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

1069 lines (916 sloc) 45.36 kB
#encoding latin1
#from Cheetah.Utils.htmlEncode import htmlEncode
####################
## Class attributes:
#attr navBarSep = '<span class="navBarSep">|</span>'
#attr title = 'Cheetah - The Python-Powered Template Engine'
#attr htmlExt = '.html'
#attr pageId = 'index'
## $apos used to avoid a syntax highlight issue in Emacs:
#attr apos = '&#39;'
#attr currentYear = time.strftime("%Y",time.localtime(time.time()))
################################################################################
## Everything outsite of '#blocks' from here to the next set of 3 commment bars
## is part of the template's .respond() method. .respond() is the default
## method and is linked into the template's __str__ method.
################################################################################
#block doctypeEtc
<?xml version="1.0" encoding="latin-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
#end block
<head>
#block headTagContents
<title>$title</title>
<link rel="stylesheet" href="screen.css" type="text/css" />
#end block headTagContents
</head>
#block bodyTag:<body class="$pageId">
#block body
#block banner
<div class="banner" align="center">
<a href="index$htmlExt"><img
class="bannerImg" src="images/cheetah-face-black-medium.jpg" alt="" /></a>
<a href="index$htmlExt"><img class="bannerText" src="images/banner_text.gif"
alt="Cheetah: The Python-Powered Template Engine" /></a>
</div>
#end block banner
<div class="pageOuterWrapper" align="center">
<div class="pageInnerWrapper0">
<div class="pageInnerWrapper1">
#block navBar
#set pages = [page.split(',') for page in [
'index,Overview',
'download,Download',
'learn,Docs',
'examples,Examples',
'whouses,Who Uses It?',
'praise,Testimonials',
'contribute,Help Out',
]]
<div align="center" class="navBarContainer">
#for i, (url, title) in enumerate(pages)
<a class="navBar $(pageId.lower()==url and 'activePage' or '')"
href="$url$htmlExt">$title</a>
#if i+1<len(pages) then $navBarSep else ''
#end for
</div>
#end block navBar
#block pageContentsWrapped
<div class="pageInnerWrapper2">
<div class="pageInnerWrapper3">
<div class="pageInnerWrapper4">
<div class="pageInnerWrapper5">
#block pageContents
#set contentsMethod = getattr(self, $pageId+'PageContents')
$contentsMethod()
#end block pageContents
#block pageContentsFooter
<div class="attributionFooter"> Cheetah was created by Tavis
Rudd, a freelance programmer and designer, with <a
href="credits$htmlExt">contributions from many open source
volunteers</a>.<br/>Its documentation is edited by Mike Orr, who
also wrote its command line tool.</div> $sourceforgeWebBug
#end block pageContentsFooter
</div> ## pageInnerWrapper5
</div> ## pageInnerWrapper4
</div> ## pageInnerWrapper3
</div> ## pageInnerWrapper2
#end block pageContentsWrapped
</div> ## pageInnerWrapper1
</div> ## pageInnerWrapper0
#block footer
<div class="copyrightFooter" align="left">
Copyright &copy; 2001-$currentYear Tavis Rudd. All rights reserved.
</div>
#end block footer
</div> ## pageOuterWrapper
#end block body
</body>
</html>
################################################################################
## The contents for each page:
################################################################################
#def indexPageContents
<table>
<tr valign="top">
<td>
<br />
<div align="center">
<img class="" src="images/cheetah-homepage-title.gif" alt="" />
</div>
<p>Cheetah is an <a href="http://opensource.org/">open source</a>
template engine and code generation tool, written in <a
href="http://python.org/">Python</a>. It can be used standalone
or combined with other tools and frameworks. Web development is its
principle use, but Cheetah is very flexible and is also being used to
generate C++ game code, Java, sql, form emails and even Python code.</p>
<p>Cheetah has a large and active user community. Products built with
Cheetah are <a href="whouses$htmlExt">used by many of the Fortune
500</a>. One prominent new user is <a
href="http://reddit.com/">reddit.com</a>, a startup funded by Paul
Graham. It has over 50,000 unique visitors a day.</p>
</td>
<td width="300">
#set sep=' <span class="sep">|</span> '
<div class="homePageUtilLinks">
<a href="http://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss"
>Mailing List</a>$sep<a href="docs/CHANGES">Changes</a>$sep<a
href="http://sourceforge.net/cvs/?group_id=28961">CVS</a>
</div>
<div class="homePageQuotes">$shortPraiseSection</div>
<a class="quotesLink" href="praise$htmlExt">read more quotes</a>
</td>
</tr>
</table>
<div class="homePageDownloadBar">
<div class="homePageDownloadBarInner">
<b>Download</b> <a
href="http://sourceforge.net/project/showfiles.php?group_id=28961">Cheetah 2.0rc8</a>
(released on April 11, 2007): bug fixes and feature enhancements.
</div>
</div>
##################################################
<p><b>Cheetah</b>:</p>
<ul class="topLevel">
<li><b>is supported by every major Python web framework</b>.</li>
<li><b>is fully documented and is supported by an active user community</b>.</li>
<li>can output/generate <b>any</b> text-based format.</li>
<li>compiles templates into optimized, yet readable, Python code.</li>
<li>blends the power and flexibility of Python with a simple template language
that non-programmers can understand.
</li>
<li>gives template authors full access to any Python data structure, module,
function, object, or method in their templates. Meanwhile, it provides a way
for administrators to selectively restrict access to Python when needed.
</li>
<li>makes code reuse easy by providing an object-oriented interface to
templates that is accessible from Python code or other Cheetah
templates. One template can subclass another and selectively
reimplement sections of it. Cheetah templates can be subclasses
of <b>any</b> Python class and vice-versa.
</li>
<li>provides a simple, yet powerful, caching mechanism that can dramatically
improve the performance of a dynamic website.
</li>
<li>encourages clean separation of content, graphic design, and program
code. This leads to highly modular, flexible, and reusable site
architectures, shorter development time, and HTML and program code that is
easier to understand and maintain. It is particularly well suited for team
efforts. </li>
<li>can be used to generate static html via its command-line tool.</li>
</ul>
##################################################
<h2>What is the philosophy behind Cheetah?</h2>
<p>Its design was guided by these principles:</p>
<ul class="topLevel">
<li>Python for the back end, Cheetah for the front end. Cheetah was
designed to complement Python, not replace it.
</li>
<li>Cheetah$(apos)s core syntax should be easy for non-programmers to learn.
</li>
<li>Cheetah should make code reuse easy by providing an object-oriented
interface to templates that is accessible from Python code or other
Cheetah templates.
</li>
<li>Python objects, functions, and other data structures should be fully
accessible in Cheetah.
</li>
<li>Cheetah should provide flow control and error handling. Logic
that belongs in the front end shouldn't be relegated to the
back end simply because it's complex.
</li>
<li>It should be easy to <b>separate</b> content, graphic design, and program
code, but also easy to <b>integrate</b> them.
<p>A clean separation makes it easier for a team of content writers,
HTML/graphic designers, and programmers to work together without stepping
on each other's toes and polluting each other's work. The HTML framework
and the content it contains are two separate things, and analytical
calculations (program code) is a third thing. Each team member should be
able to concentrate on their specialty and to implement their changes
without having to go through one of the others (i.e., the dreaded
"webmaster bottleneck"). </p>
<p>While it should be easy to develop content, graphics and program code
separately, it should be easy to integrate them together into a website. In
particular, it should be easy: </p>
<ul>
<li>for <b>programmers</b> to create reusable components and functions
that are accessible and understandable to designers.
</li>
<li>for <b>designers</b> to mark out placeholders for content and
dynamic components in their templates.
</li>
<li>for <b>designers</b> to soft-code aspects of their design that are
either repeated in several places or are subject to change.
</li>
<li>for <b>designers</b> to reuse and extend existing templates and thus
minimize duplication of effort and code.
</li>
<li>and, of course, for <b>content writers</b> to use the templates that
designers have created.</li>
</ul>
</li>
</ul>
#end def
################################################################################
#def creditsPageContents
<p>Cheetah was created by Tavis Rudd, a freelance programmer and designer, with
contributions from many open source volunteers. Its documentation is edited by
Mike Orr, who also wrote its command line tool.</p>
<p>We$(apos)d like to thank the following people for contributing valuable
advice, encouragement, code and bug reports: </p>
<ul>
#call $displayLinesAsList
Aaron Held
Alex Le Dain
Alex Martelli
Alvaro Tejero Cantero
Andrea Arcangeli
Andreas Poisel
Andrew Glover
Andrew Johnson
Arkaitz Bitorika
Baruch Even
Bob Van Zant
Brian Bird
Chad Walstrom
Chris Murphy
Christophe Eymard
Chuck Esterbrook
Chui Tey
Clark C. Evans
Craig Kattner
David Warnock
Deelan
Dirk Hoffmann
Donnie Hale
Doug Wyatt
Edmund Lian
Erik Forsberg
Federico Di Gregorio
Franz Geiger
Geir Magnusson
Geoff Talvola
Graham Dumpleton
Greg Czajkowski
Hamish Lawson
Henning Hasemann
Ian Bicking
James Robinson
Jamieson Becker
Jaroslaw Zabiello
Jay Love
Jeff Johnson
Jeremiah Bellomy
Johan Fredrik Ohman
Johannes Erdfelt
Jonathan Mark
Jose Galvez
Jurie Horneman
Keith Devens
Kevin Dangoor
Leith Parkin
Leonard Richardson
Marcin Gajda
Markus Jais
Max Ischenko
Michael Engelhart
Michael Halle
Michel Thadeu
Mike Warren
Oleg Broytmann
Olivier Favre-Simon
Paul Boddie
Patrick K. O$(apos)Brien
Paul Sorenson
Peyton McCullough
Peter Hunt
Peter Mott
Peter Lyons
Peter White
Philippe Normand
Pierre-Yves Delens
Rene Pijlman
Rimon Barr
Robert Cowham
Robert Kuzelj
Rodrigo B. de Oliveira
Scott Sanders
Sasa Zivkov
Shannon -jj Behrens
Stephan Diehl
Stephane Bortzmeyer
Steve Holden
Suriya Narayanan
Terrel Shumway
Todd Thomas
Tracy Ruggles
Tom Schwaller
Warren Smith
William Dodé
Winston Wolff
Zed Lopez
#end call
</ul>
<p>The <a href="http://jakarta.apache.org/velocity/">Velocity</a>, <a
href="http://www.webmacro.org/">WebMacro</a>, <a
href="http://smarty.php.net/">Smarty</a> and <a
href="http://www.masonhq.com/">Mason</a> projects provided inspiration and
design ideas. Cheetah has benefited from the creativity and energy of their
developers. Thank you.</p>
<p>On a historical note, Cheetah is one of several templating frameworks that
grew out of a "templates" thread on the <a
href="http://www.webwareforpython.org/">Webware for Python</a> email list.</p>
#end def
################################################################################
#def learnPageContents
<h3>Official Documentation</h3>
<p>Note, the official documentation describes Cheetah 1.0. We are in the
process of updating it to include the changes in the 2.0 release. For the
time-being, the changes in 2.0 are described in the module docstrings and in
the <a href="docs/CHANGES">CHANGES</a> log.</p>
<p><b>Cheetah Users' Guide:</b> ##'
<a href="docs/users_guide_html/"><b>HTML</b></a>
<a href="docs/users_guide_html_multipage/">Multi-page HTML</a>
<a href="docs/users_guide.ps">Postscript</a>
<a href="docs/users_guide.txt">Text</a>
<a href="docs/users_guide.pdf">PDF</a>
</p>
<p><a href="http://seapig.org/CategoryCheetahDocs">The beginnings of new documentation for Cheetah 2.0</a> (work in progress)
</p>
##<p><b>Cheetah Developers$(apos) Guide:</b>
##<a href="docs/devel_guide_html/"><b>HTML</b></a>
##<a href="docs/devel_guide_html_multipage/">Multi-page HTML</a>
##<a href="docs/devel_guide.ps">Postscript</a>
##<a href="docs/devel_guide.txt">Text</a>
##<a href="docs/devel_guide.pdf">PDF</a>
##</p>
<p> Also see the latest
<a href="docs/CHANGES">CHANGES</a>,
<a href="docs/TODO">TODO</a>,
<a href="docs/BUGS">BUGS</a>.
</p>
<p>The LaTeX source for the Users' Guide and Developers' Guide is in the CVS
module <b>CheetahDocs</b> at SourceForge, <a
href="http://sourceforge.net/cvs/?group_id=28961">http://sourceforge.net/cvs/?group_id=28961</a>.</p>
<h3>Unofficial Documentation and Articles</h3>
<p><a href="$('http://www-128.ibm.com/developerworks/opensource/library/'
'os-pythcheetah/?ca=dgr-lnxw06PythonCheetah')">Building and filling out
templates with Python and Cheetah</a> by Leonard Richardson, Software Engineer
at CollabNet. Published in IBM Developer Works, August 9th, 2005. Leonard
Richardson is the author of many Python applications and libraries, including
NewsBruiser and Beautiful Soup. He is a co-author of the new tome Beginning
Python, from Wrox.</p>
<p><a
href="http://www.onlamp.com/pub/a/python/2005/01/13/cheetah.html">Python-Powered
Templates with Cheetah</a> by Andrew Glover, founder and CTO of Vanward
Technologies, a company specializing in building automated testing frameworks.
Published in O'Reilly's ONLamp.com, January 13th, 2005</p>
<p><a href="http://www.devshed.com/c/a/Python/Templating-with-Cheetah/">Templating with
Cheetah</a>, a DevShed article by Peyton McCullough. Published in December 2005.</p>
<p><a href="http://linuxgazette.net/117/orr.html">Templating in Python</a>, a
Linux Gazette article by Mike Orr. Published in Issue 117 of Linux Gazette,
August 2005.</p>
<p><a href="http://www.unixreview.com/documents/s=10075/ur0604h/">Regular
Expressions: CherryPy proves its worth</a>, an Unix Review article by Miki
Tebeka and Cameron Laid. They build a small addressbook application in less
than 150 lines of code using the CherryPy web framework and Cheetah.
Published May 2006.</p>
<p><a
href="http://coderseye.com/2006/how-to-install-cheetah-on-dreamhost.html">How
to install Cheetah on Dreamhost</a>, a blog article published by Bruce Kroeze
in January 2006.</p>
<p><a href="$('http://www.linuxenterprise.de/itr/online_artikel/'
'psecom,id,639,nodeid,9.html')">Tierisch gut Das Cheetah Templating-System in
der Praxis</a>, a German-language article by Markus Jais. Published in the
December 2004 edition of <a
href="http://www.linuxenterprise.de/">http://www.linuxenterprise.de/</a>.
<p><a href="docs/OnePageTutorial.html">One-Page Tutorial</a> for template
maintainers. Covers a few basic concepts.</p>
<p> <a href="http://wingware.com/python/success/st-andrews">Python Success
Stories: Python Enterprise-Wide at the University of St Andrews in
Scotland</a> by Hamish Lawson. Cheetah is used for the presentation
layer. Hamish Lawson is a software developer in the IT Services department at
the University of St Andrews, Scotland. Published January 17th, 2003.</p>
<p><a
href="http://www.codegeneration.net/tiki-read_article.php?articleId=39">Code
Generation Network - Case Study with Peter White</a>, an interview that
discusses using Cheetah for generating Java code in a financial services
application. "Given my recent experience with Python and Cheetah, I can't
imagine an easier way to generate code!" Published March 1st, 2004.</p>
<p>The <a href="Py10.html">Python10 conference paper</a> about Cheetah, by
Tavis Rudd, Mike Orr, and Ian Bicking. It provides a high-level introduction
to Cheetah and the philosophy behind its design. Published in December
2001.</p>
<p>Cheetah is covered in <a
href="$('http://www.amazon.com/exec/obidos/tg/detail/-/0596001886/'
'ref=pd_sim_b_2/002-9262270-4252038?%5Fencoding=UTF8&amp;v=glance')">Python in a
Nutshell</a>, by Alex Martelli. Alex writes on the Cheetah list: "Nutshell
readers looking for templating engines will be tempted by my ultra-brief
coverage enough to come visit the Cheetah site and get stunned. Indeed, I'm
impressed enough that I plan to cover _only_ Cheetah as the one tool for any
serious templating need."</p>
<p>It is also introduced in the New Riders book <a
href="http://www.informit.com/title/0735710902">Python Web Programming</a>, by
Steve Holden. Steve writes "Although the software is still in beta at the
time of writing, it is already stable and easy to use either with or without
Webware. It looks as though Cheetah will be useful to many web projects, as
well as any others that need flexible template substitution of a general
nature." Published Jan 8th, 2002.</p>
#end def
################################################################################
#def downloadPageContents
<p>The most <a
href="http://sourceforge.net/project/showfiles.php?group_id=28961">recent
stable release</a> was 2.0rc8 on April 11th, 2007. Cheetah has been <b>stable,
production quality, post-beta code since 2001</b>. All new releases since then
(40+) have been almost <b>100% backwards compatible</b>. The 'rc' in this
release name only indicates that we have yet to update the documentation.
The 2.0 code itself is production ready.</p>
<p>Here$(apos)s the documentation on <a
href="http://cheetahtemplate.org/docs/CHANGES">recent changes</a>.</p>
<p>You can also get the current unreleased development version of Cheetah from
our <a href="http://sourceforge.net/cvs/?group_id=28961">CVS
repository</a>.</p>
<p>Cheetah is included in FreeBSD and most major Linux distributions:
Gentoo, Fedora, Debian, and Ubuntu among others.</p>
<p><b>IMPORTANT NOTE TO WINDOWS USERS:</b> You should
install the compiled version of Cheetah\'s NameMapper. It is dramatically faster
than the pure Python version! Python 2.4: <a
href="http://cheetahtemplate.org/_namemapper.pyd2.4">_namemapper.pyd2.4</a>,
Python 2.5: <a
href="http://cheetahtemplate.org/_namemapper.pyd2.5">_namemapper.pyd2.5</a>.
Install it wherever your system puts Cheetah/NameMapper.py. Strip the
version numbers off the filename.</p>
#end def
################################################################################
#def examplesPageContents
<p>Here's a very simple example that illustrates some of Cheetah's basic syntax:</p>
<dl><dd><pre class="verbatim">
#call htmlEncode
#raw
<html>
<head><title>$title</title></head>
<body>
<table>
#for $client in $clients
<tr>
<td>$client.surname, $client.firstname</td>
<td><a href="mailto:$client.email">$client.email</a></td>
</tr>
#end for
</table>
</body>
</html>
#end raw
#end call
</pre></dl>
<p>Compare this with PSP:</p>
<dl><dd><pre class="verbatim">
#call htmlEncode
#raw
<html>
<head><title><%=title%></title></head>
<body>
<table>
<% for client in clients: %>
<tr>
<td><%=client['surname']%>, <%=client'[firstname']%></td>
<td><a href="mailto:<%=client['email']%>">
<%=client['email']%></a></td>
</tr>
<%end%>
</table>
</body>
</html>
#end raw
#end call
</pre></dl>
<p>See the <a href="learn$htmlExt">documentation</a> for more examples.</p>
#end def
################################################################################
#def whousesPageContents
<table class="whoUsesTable">
<tr valign="top">
<td>
<p>Cheetah is being used in a wide variety of commercial, government,
academic, personal, and open-source projects &amp; products. Products
built with Cheetah are used by many of the Fortune 500.</p>
<p>This page provides selected examples. It is not an exhaustive list. If
you use Cheetah and wish to be added here, please send an email to the <a
href="http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss">mailing
list</a>.</p>
<ul class="topLevel">
<li>One major example of commercial use are the email gateway appliances from
<a href="http://www.ironport.com/products/">IronPort Systems</a>, which are
used by the largest corporations and ISPs in the world. IronPort$(apos)s products
contain over a million lines of Python and use Cheetah plus <a
href="http://aquarium.sf.net">Aquarium</a> for their user interfaces.</li>
<li>A prominent example of government use is <a
href="http://www.incidentnews.gov/">Incident News</a>, which provides news,
photos, and other information about spill incidents and response actions in
the U.S. A larger private site is used to feed the items on the public
site. The site is maintained by the Hazardous Materials Response Division,
Office of Response and Restoration, National Ocean Service, National Oceanic
and Atmospheric Administration (NOAA), in support of U.S. Coast Guard incident
response operations.</li>
<li>The <a href="http://www.st-andrews.ac.uk/">University of St. Andrews</a>,
in Scotland, uses Python + Cheetah for their student records system.
St. Andrews is the 3rd oldest university in the English speaking world. See
this <a href="http://wingware.com/python/success/st-andrews">write-up</a> for
details.</li>
<li>It is supported by, and used with, every major Python web
development framework:
<ul>
#call self.displayLinesAsList
$pythonFrameworksUsing(includeWrapperText=False,sep='',includeWebwareInList=True)
#end call
</ul>
</li>
<li>Cheetah is included in FreeBSD and most major Linux distributions:
Gentoo, Fedora, Debian, and Ubuntu among others.</li>
#call self.displayLinesAsList
<a href="http://info.patientwire.com/">PatientWire</a>
<a href="http://reddit.com/">reddit.com</a> 50,000 unique visitors/days
<a href="http://gentooexperimental.org/meatoo/">Gentoo Linux</a>
<a href="http://dentalle.com/">Dentalle Inc.</a>
$makeLink('http://bosco.tigris.org/') A JMI-compliant template-based code generator. #slurp
It reads XMI files and generates the corresponding source code, #slurp
in different object-oriented languages (Java, Eiffel, Python, C++). #slurp
In the case of Java, the generated code implements the JMI interfaces.
$makeLink('http://www.intertwingly.net/blog/'), #slurp
blog of <a href="http://www.intertwingly.net/wiki/pie/SamRuby">Sam Ruby</a>, #slurp
Apache Foundation Director
$makeLink('http://klive.cpushare.com/'), #slurp
<a href="http://kerneltrap.org/node/3148">Andrea Arcangeli$(apos)s</a> #slurp
"Linux Kernel Live Usage Monitor"
$makeLink('http://www.instasong.com/InstaSong/')
$makeLink('http://www.axiomfire.com/') All internal tools and live eDialogues built with Cheetah
$makeLink('http://initd.org/') (makers of psycopg and pysqlite)
$makeLink('http://www.asti-usa.com/') #slurp
(Andrew Kuchling is currently porting their large web app to Cheetah)
$makeLink('http://snurf.bdash.net.nz/') a Python-based blogging system
$makeLink('http://linuxgazette.net/')
$makeLink('http://www.teenwag.com/') 120,000+ users per day
$makeLink('http://pyblosxom.sourceforge.net/')
$makeLink('http://pyds.muensterland.org/')
$makeLink('http://faces.homeip.net/')
$makeLink('http://map.wirelesslondon.info/')
$makeLink('http://tboard.sourceforge.net/')
$makeLink('http://singleshot.org/')
$makeLink('http://invisiblecastle.com/') free gaming site, 70,000 hits a month
$makeLink('http://www.python-hosting.com/')
$makeLink('http://www.petersblog.org/')
$makeLink('http://www.lococitato.com/')
###$makeLink('http://www.usenix.org/events/lisa03/tech/'
##'full_papers/giridharagopal/giridharagopal_html/')
$makeLink('http://tools.arlut.utexas.edu/DryDock/') #slurp
a large web-publishing application focussed on workflow
$makeLink('http://wiki.osuosl.org/display/DEV/OJBDoc')
##$makeLink('http://www.electronicappraiser.com/')
## seems to have switched to coldfusion
#end call
<li>Cheetah supports internationalization and has a large non-English userbase, including:
<ul>
#call self.displayLinesAsList
$makeLink('http://www.chinaliveuk.org.uk') (Chinese)
$makeLink('http://www.alqua.org/') (Spanish)
$makeLink('http://bank.muratordom.pl/') (Polish)
$makeLink('http://bank.muratorplus.pl/') (Polish)
$makeLink('http://ustawki.net/') game-manager for soccer fans (Polish)
$makeLink('http://www.encyclon.net/multiblast') (Korean) Bioinformatics Tool
$makeLink('http://www.aufeinander.de/') (German)
$makeLink('http://www.katechese.at/') (German)
$makeLink('http://www.herschberger.at/') (German)
$makeLink('http://www.oejhw.or.at/') (German)
$makeLink('http://www.go-direct.at/') (German)
$makeLink('http://www.dmvoe.at/') (German)
$makeLink('http://seps.flibuste.net/') (French)
$makeLink('http://flibuste.net/') (French)
$makeLink('http://www.tac.cz/') (Czech)
$makeLink('http://www.cestovatel.cz/') (Czech)
$makeLink('http://www.geogr.muni.cz/') (Czech)
$makeLink('http://www.iddk.ru/') (Russian)
$makeLink('http://shop.iddk.ru/') (Russian)
#end call
</ul>
</li>
</ul>
</td>
###
<td width="250">
<ul>
#call self.displayLinesAsList
Dell
CNN
NASDAQ
Ebay
Sony
EDS
GAP
Maytag
PayPal
Juniper
Road Runner
Whirlpool
Capital One
Liberty Mutual
Continental Airlines
General Foods
Prudential Financial
Aetna
Dentalle Inc.
Dentall Inc. (China)
<i>Hundreds of dental practices</i>
Imperial Optical
Wolf Bioscience
<i>Hundreds of eye-care practices</i>
John Hopkins University
Harvard University
University of St. Andrews
University of British Columbia
Ryder
AON
Franklin Templeton Investments
Manulife
Societe Generale
Juniper Networks
Masco
ADP
Liberty Mutual
RJ Renolds
Charter Communications
BNP Paribas
L.A. Care Health Plan
Salt Lake County
Grand Prairie ISD
ASTi
Reddit.com
LinuxGazette.com
HFD.com
#end call
</ul>
</td>
</tr>
</table>
#end def
################################################################################
#def contributePageContents
<p>Cheetah is the work of <a href="credits$htmlExt">many volunteers</a>. If
you use Cheetah, share your experiences, tricks, customizations, and
frustrations. Please join the <a
href="http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss">mailing
list</a>.</p>
<h3>Publicity</h3>
<p>Help spread the word: blog about it, write articles about it, recommend it
to others, etc.</p>
<h3>Bug reports and patches</h3>
<p>If you think there is a bug in Cheetah, send a message to the email list with
the following information:</p>
<ol>
<li>a description of what you were trying to do and what happened</li>
<li>all tracebacks and error output</li>
<li>your version of Cheetah</li>
<li>your version of Python</li>
<li>your operating system</li>
<li>whether you have changed anything in the Cheetah installation</li>
</ol>
<h3>Example sites and tutorials</h3>
<p>If you$(apos)re developing a website with Cheetah, please send a link to the
email list so we can keep track of Cheetah sites. Also, if you discover new
and interesting ways to use Cheetah please share your experience and write a
quick tutorial about your technique.</p>
<h3>Test cases</h3>
<p>Cheetah is packaged with a regression testing suite that is run with each
new release to ensure that everything is working as expected and that recent
changes haven$(apos)t broken anything. The test cases are in the Cheetah.Tests
module. If you find a reproduceable bug please consider writing a test case
that will pass only when the bug is fixed. Send any new test cases to the
email list with the subject-line "new test case for Cheetah." </p>
#end def
################################################################################
#def praisePageContents
#call $shortPraiseSection
$formatQuote("There is no better solution than Cheetah.", 'William Dodé')
##post on cheetah list about initd.org
$formatQuote('i did it in a single night (i _love_ cheetah templates ;)',
'''<a href="http://initd.org/">Federico Di Gregorio</a>,
developer of Python\'s Postgresql library''')
$formatQuote("""Cheetah is an order of magnitude faster than nevow, and it's
more powerful and flexibile and its syntax is *much* more readable too
IMHO. The speedup after moving klive (<a
href=\"http://klive.cpushare.com/\">klive.cpushare.com</a>) from nevow to
Cheetah has been huge ... 300% speedup. I used klive as a test for Cheetah
and it worked so well that I'm rewriting <a
href=\"http://cpushare.com/\">cpushare.com</a> with ... Cheetah.""",
'''<a href="http://kerneltrap.org/node/3148">Andrea Arcangeli</a>, the
kernel hacker behind Linux\'s new virtual memory subsystem, and SUSE Linux
employee''')
## http://bitworking.org/news/37
$formatQuote("""I am currently in the process of re-doing the templating
mechanism in RESTLog, throwing out my hand made templating scheme and
replacing it with Cheetah and it's been a great success. I initially learned
of Cheetah from Sam Ruby as he is using to write his own blogging
software. The transformations are fast and Cheetah, to me, has struck just
the right balance, sticking to adding features needed for templating and
avoiding the tempation to become a full-blown language on it's own, instead
deferring to Python when appropriate. ... Cheetah definitely passes by first
cut utility test, in adding Cheetah to RESTLog my code got smaller and
cleaner.""",
'''<a href="http://www.xml.com/pub/au/225">Joe Gregorio</a>, editor of
the <a href="http://www.ietf.org/">IETF</a> <a
href="http://atomenabled.org/">Atom</a> <a
href="http://bitworking.org/projects/atom/">Publishing Protocol</a> specification
(along with <a href="http://dehora.net/">Bill de hÓra</a>) and creator of
the <a href="http://bitworking.org/projects/sparklines/">Python Sparklines
Module</a>''')
## http://www.intertwingly.net/blog/1189.html
$formatQuote("""Cheetah looks amazing. Wish I'd known about it before I
went and invented my own damn templating language for my day project.""",
'''<a href="http://diveintomark.org/">Mark Pilgrim</a>,
author of <a href="http://diveintopython.org/">Dive Into Python</a> &amp;
<a href="http://diveintogreasemonkey.org/">Dive Into Greasemonkey</a>,
and creator of <a href="http://feedparser.org/">feedparser.org</a>
&amp; <a href="http://feedvalidator.org/">feedvalidator.org</a>''')
$formatQuote("""Cheetah seems to be practically the only web templating
format with decent taste. On top of that, it doesn't try to limit the
programmers with needless restrictions and hoops. ... <a
href=\"http://reddit.com/\">reddit.com</a> was recently rewritten with
Python and Cheetah Templates. The project seems to have gone really well
and the former-Lisp developers really enjoyed Cheetah's simple syntax.""",
'''<a href="http://www.aaronsw.com/">Aaron Swartz</a>, co-author of the
RSS 1.0 specification''')
$formatQuote("""<i>Happy little gophers</i>... <a
href=\"http://socialserve.com\">Socialserve.com</a> is switching over from a
J2EE stack (JBoss / JPublish (used Velocity for templating)) over to a
fastcgi-based web publishing system with Cheetah as the star. Site-wide,
we're currently serving an average of 68K pages (198K 'hits') per day, with
the Cheetah'd pages doing more than 65% of that traffic. Our web traffic has
doubled in the past 6 months, and that growth curve shows no sign of slowing
down.<br /><br />
We have found Cheetah to be a gloriously flexible and powerful
technology. Functions within templates allowed us to do far more elegant
structured programming at the document level. Being able to use templates as
python classes, importing constants and other goodies directly from our
middleware python code really lets them act as first class code members
instead of an ugly lesser citizen.""",
'<a href="http://socialserve.com">James Robinson</a>')
##http://www.pythonweb.org/projects/webmodules/doc/0.5.3/html_multipage/lib/example-file-web-template-cheetah.html
$formatQuote("Cheetah is a powerful, stable and well documented templating system.", 'James Gardner')
##http://keithdevens.com/weblog/archive/2003/Nov/17/Python.Cheetah
$formatQuote("Cheetah is very nice. Good code even!", 'Keith Devens')
$formatQuote("""People with a strong PHP background absolutely love Cheetah for being Smarty,
but much, much better.""", 'Marek Baczynski')
$formatQuote("""I am using Smarty and I know it very well, but compiled Cheetah
Templates with its inheritance approach is much powerful and easier to
use than Smarty.""", 'Jaroslaw Zabiello')
$formatQuote("""A cheetah template can inherit from a python class, or a cheetah
template, and a Python class can inherit from a cheetah template. This
brings the full power of OO programming facilities to the templating
system, and simply blows away other templating systems.""", 'Mike Meyer')
$formatQuote('Love your work guys.', 'Alex Le Dain')
$formatQuote("""I'm trying code generation with Cheetah.
I have to say it's a pleasure compared to XSLT!""", 'Alex J. Champandard')
$formatQuote("""Cheetah has successfully been introduced as a replacement for the
overweight XSL Templates for code generation. Despite the power of XSL
(and notably XPath expressions), code generation is better suited to
Cheetah as templates are much easier to implement and manage.""",
'''The <a
href="http://fear.sourceforge.net/docs/latest/guide/Build.html#id2550573">FEAR</a>
development team''')
##http://www.thescripts.com/forum/post365058-2.html
$formatQuote("I'm greatly in favour of Cheetah.", 'Sybren Stuvel')
##http://www.codegeneration.net/tiki-read_article.php?articleId=39
$formatQuote("""I ran across Cheetah, 'a Python-powered template engine and
code generator', and haven't looked back since.
... it was a breeze to crank out several
templates in a short period of time. In only a few hours a night, over three
nights, I was able to learn enough about Python and Cheetah to write a code
generator that generates my POJOs, DAOs, and WebWork2 action classes. ...
Given my recent experience with Python and Cheetah, I can't imagine an
easier way to generate code! """,
'''Peter White, in an <a
href="http://www.codegeneration.net/tiki-read_article.php?articleId=39">interview</a>
on the "Code Generation Network"''')
##http://blog.kodemaniak.de/archives/10-Python-template-system.html
$formatQuote("Cheetah is very powerful and flexible.", 'Carsten Saathoff')
## http://groups.google.com/group/turbogears/tree/browse_frm/thread/bb7a6115ca7028c9/4bd4ca24aa61d75c?rnum=111&q=cheetah+python&_done=%2Fgroup%2Fturbogears%2Fbrowse_frm%2Fthread%2Fbb7a6115ca7028c9%2F7bffb1c3622af7a4%3Flnk%3Dst%26q%3Dcheetah+python%26rnum%3D9%26#doc_7bffb1c3622af7a4
$formatQuote("I've used Cheetah quite a bit and it's a very good package.",
'<a href="http://turbogears.org/">Kevin Dangoor</a>, lead developer of TurboGears')
$formatQuote("""Cheetah is an extremely effective Python-powered template
engine that can generate any text-based format. Cheetah's impressive yet
simple template language (based on Python) can yield the most complex of
documents ... Cheetah is surprisingly simple to use""",
c'''<a href="http://www.onlamp.com/pub/a/python/2005/01/13/cheetah.html">Andrew
Glover</a>, in an article published on O$(apos)Reilly ONLamp.com''')
##http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/4865ad8dced9d4db/133ada37370deb55?rnum=1&q=cheetah+python&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2F4865ad8dced9d4db%2Ff932e1952225168c%3Flnk%3Dst%26q%3Dcheetah+python%26rnum%3D95%26#doc_f932e1952225168c
$formatQuote("Regarding the template engine, the best one I'm aware of is Cheetah.", 'Alessandro Bottoni')
$formatQuote("""Just a quick note to say thanks for the work you've put into
Cheetah. I had this unholy hack of several perl scripts to do my html
templating. After seeing the light and moving to Python, I dreaded
rewriting all of that working code. But, after finding Cheetah, I seriously
had something working in under an hour that is way better than all of those
perl scripts that took me weeks to write. Awesome stuff.""", "Rob McMullen")
$formatQuote("""I write to say THANK YOU again! I'm very pleased to see such a friendly
community. I appreciate your help! =)""", 'Timur Izhbulatov')
$formatQuote("""I hand it to the makers: Cheetah is great stuff. I've used
WebMacro for years and this even improves on it. Specifically I like the
blocks/functions and the ability to dynamically derive (thanks to python for
that""", 'Torsten Rueger')
##http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/eac957ba7c426e30/3ebe6739c8c41752?rnum=31&q=cheetah+python&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2Feac957ba7c426e30%2Fa3b9cd8f6cc9e640%3Flnk%3Dst%26q%3Dcheetah+python%26rnum%3D12%26#doc_c166b21577e3ad06
$formatQuote("""But, the problem is PHP itself has so many bad features that I
prefer rather Python to PHP. And I like Cheetah's inheritence aproach
because it is scales very well for complicated web pages. I can develop
internet application much faster using Python (e.g. using application, very
cool and pythonic Cherry2) and Cheetah. And because extending templates
using OO techniques is tthe feature I like, I would rather choose Cheetach
than ZPT, SimleTAL, Nevow and similar solutions.""", 'Jaroslaw Zabiello')
## http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/adbc3058a431f1b8/5b49623e0a8c782c?rnum=31&q=cheetah+template&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2Fadbc3058a431f1b8%2F3a45e7ec2e495bd2%3Flnk%3Dst%26q%3Dcheetah+template%26rnum%3D67%26#doc_3a45e7ec2e495bd2
$formatQuote("""Another great bonus of Spyce is that it can work with Cheetah,
the one templating system which I felt like I could live with.""", 'Jonathan P.')
## http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/6ac8c68b6060003e/f3a99fd7ec17d6d5?rnum=1&q=cheetah+template&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2F6ac8c68b6060003e%2F40fe71c3d3ab0bd8%3Flnk%3Dst%26q%3Dcheetah+template%26rnum%3D22%26#doc_40fe71c3d3ab0bd8
$formatQuote(
"""My graphist and me found it excellent, fast, clear, simple, stable: Pythonic!
We found the others engines too verbose ... I use it to generate html, latex and xml""",
'William Dodé')
$formatQuote("""I was going to try and learn Kid, but I'm in a bit of a hurry,
and Cheetah's much closer to what I'm used to.""", 'Dave Benjamin')
$formatQuote("""Personally, I prefer to Cheetah Templates to PSP - it plays better in the OO
world, and I can use intelligent HTML/XML/SGML editors on the files.""", 'Mike Meyer')
#end call
#end def
################################################################################
## Helper methods & content snippets used in multiple places
################################################################################
#def displayLinesAsList(arg):
#for ln in arg.splitlines()
#set ln = $ln.strip()
#if not ln
#continue
#end if
<li>$ln</li>
#end for
#end def
#def makeLink(link, title=None)
<a href="$link">#if title then title else link#</a> #slurp
#end def
################################################################################
#def formatQuote(quote, citation)
<div class="quote">
<span class="quote">&#8220;$quote&#8221;</span>
<div class="citation">
<cite>- $citation</cite>
</div>
</div>
#end def
################################################################################
#def shortPraiseSection(extraItems=None)
$formatQuote("I'm enamored with Cheetah",
'''<a
href="http://www.intertwingly.net/wiki/pie/SamRuby">Sam Ruby</a>,
senior member of IBM\'s Emerging Technologies Group &amp; director of Apache Software Foundation''')
$formatQuote("""Give Cheetah a try. You won't regret
it. ... Cheetah is a truly powerful system. ... Cheetah is a serious
contender for the 'best of breed'""", ## ... Python templating.
'''<a
href="http://conferences.oreillynet.com/cs/os2005/view/e_spkr/1541">Alex
Martelli</a>, Google uber techie, core Python developer
&amp; author of several popular Python books''')
#if extraItems then extraItems else ''
#end def
################################################################################
#def sourceforgeWebBug
<img src="http://sourceforge.net/sflogo.php?group_id=28961&amp;type=1"
width="0" height="0" ## width="88" height="31"
border="0" alt="SourceForge.net Logo" />
#end def
################################################################################
#def pythonFrameworksUsing(includeWrapperText=True, sep=',', includeWebwareInList=False)
#if includeWrapperText
<p>Cheetah was originally designed to integrate with <a
href="http://www.webwareforpython.org/">Webware for Python</a>, a
Python-powered application server, but it can be used with <b>any</b> Python
web framework. It is being used with
#end if
#if includeWebwareInList
<a href="http://www.webwareforpython.org/">Webware for Python</a>$sep
#end if
<a href="http://aquarium.sourceforge.net/">Aquarium</a>$sep
<a href="http://www.modpython.org/">mod_python</a>$sep
<a href="http://quixote.ca/qx/TemplatingWithCheetah">Quixote</a>$sep
<a href="http://www.cherrypy.org/">CherryPy</a>,
<a href="http://www.turbogears.org/">TurboGears</a>$sep
<a href="http://www.djangoproject.com/">Django</a>$sep
<a href="http://pythonpaste.org/">Paste</a>$sep
<a href="http://subway.python-hosting.com/">Subway</a>$sep
<a href="http://www.pythonweb.org/projects/webmodules/">Python Web Modules</a>$sep
<a href="http://spyce.sourceforge.net/">Spyce</a>$sep
<a href="http://www.ivy.fr/tahchee/">Tahchee</a>$sep
<a href="http://www.cs.virginia.edu/~lab2q/">plain-old-cgi</a>$sep
#if includeWrapperText
and others. Most of these frameworks provide automatic session, cookie, and
user management and can be used with almost any operating-system, web
server, or database.</p>
#end if
#end def
Jump to Line
Something went wrong with that request. Please try again.