summaryrefslogtreecommitdiff
path: root/index.tmpl
blob: 2640e5dea887d584601d9a82a6b3f7ed3413357d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#import WikiRoot
#from Cheetah.Filters import Markdown, CodeHighlighter
#extends WikiRoot.WikiRoot

#def pagename()
	#return 'Home'
#end def

#def nutshell()
#transform CodeHighlighter
\#from Cheetah.Template import Template
\#extends Template

\#set \$people = [{'name' : 'Tom', 'mood' : 'Happy'}, {'name' : 'Dick', 'mood' : 'Sad'}, {'name' : 'Harry', 'mood' : 'Hairy'}]
<strong>How are you feeling?</strong>
<ul>
    \#for \$person in \$people
        <li>
            \$person['name'] is \$person['mood']
        </li>
    \#end for
</ul>
#end def

#def content()
#transform Markdown
Community Cheetah
=================
Community Cheetah is the rebirth of the [Cheetah Template](http://www.cheetahtemplate.org/) engine.
The Cheetah Templating engine is a [Python](http://www.python.org)-powered templating engine
that can output or generate practically **any** text-based format (including Python itself!)

Cheetah already has a large and active user community, and there are a number of products built with Cheetah in the
Fortune 500, as well startups in Silicon Valley (like [Slide](http://www.slide.com) and [Yelp](http://www.yelp.com))

Cheetah in a nutshell
---------------------
Below is a simple example of some Cheetah code, as you can see it's *pretty much* just Python. You can import, inherit and 
define methods just like in a regular Python module, since that's what your Cheetah templates are compiled to :)

$nutshell()

Why should I use Cheetah?
-------------------------
* Cheetah is supported by every major Python web framework.
* It is fully documented and is supported by an active user community.
* It can output/generate any text-based format.
* Cheetah compiles templates into optimized, yet readable, Python code.
* It blends the power and flexibility of Python with a simple template language that non-programmers can understand. 
* It 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. 
* Cheetah 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 any Python class and vice-versa. 
* It provides a simple, yet powerful, caching mechanism that can dramatically improve the performance of a dynamic website. 
* It 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. 
* Cheetah can be used to generate static html via its command-line tool.

Why Community Cheetah?
----------------------
The primary motivations for the Community Cheetah fork is to maintain *active* development outside of 
the currently-stale [Cheetah CVS tree](http://sourceforge.net/scm/?type=cvs&group_id=28961). Community Cheetah
isn't meant to diverge from the main goals of Cheetah: speed, ease of use and stability, but rather Community
Cheetah is meant to reinvirgorate the community surrounding Cheetah and provide **monthly** releases incorporating
patches and improvements to the engine.
#end def