summaryrefslogtreecommitdiff
path: root/index.html
blob: f1ae28b2244d01a8f2a2decfa7418b51cc94d856 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>Community Cheetah - The Python-Powered Template Engine - Home</title>
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
        <meta name="keywords" content="cheetah, template engine, python, community cheetah, templating, markdown, markup, mod_python, webware"/>
        <meta name="googlebot" content="index, follow" />
        <meta name="language" content="en-us, english" />

        <link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen, projection, tv" />
    </head>
    <body>

        <a href="http://github.com/rtyler/cheetah">
    <img style="position: absolute; top: 0; left: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png" alt="Fork me on GitHub" />
</a>
    <div id="blogtitle">
            <div id="small" style="margin-left: 130px;"><a href="#">Community Cheetah</a> </div>
            <div id="small2">
                    <a href="index.html">Home</a>&nbsp;|&nbsp;
                    <a href="http://bugs.communitycheetah.org">Issues</a>&nbsp;|&nbsp;
                    <a href="http://github.com/rtyler/cheetah/tree/master">Source</a>&nbsp;|&nbsp;
                    <a href="roadmap.html">Roadmap</a>&nbsp;|&nbsp;
            </div>
    </div>
            
    <div id="topmenu">
        <ul class="BLUE">
                <li>
                    <a href="index.html" title="Home">
                        <span>Home</span>
                    </a>
                </li>
                <li>
                    <a href="download.html" title="Download">
                        <span>Download</span>
                    </a>
                </li>
                <li>
                    <a href="docs.html" title="Documentation">
                        <span>Documentation</span>
                    </a>
                </li>
                <li>
                    <a href="recipes.html" title="Recipes">
                        <span>Recipes</span>
                    </a>
                </li>
                <li>
                    <a href="community.html" title="Community">
                        <span>Community</span>
                    </a>
                </li>
                <li>
                    <a href="developers.html" title="Developers">
                        <span>Developers</span>
                    </a>
                </li>
        </ul>
    </div>



        <div id="centercontent">
           <h1>Community Cheetah</h1>
<p>Community Cheetah is the rebirth of the <a href="http://www.cheetahtemplate.org/">Cheetah Template</a> engine.
The Cheetah Templating engine is a <a href="http://www.python.org">Python</a>-powered templating engine
that can output or generate practically <strong>any</strong> text-based format (including Python itself!)</p>
<p>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 <a href="http://www.slide.com">Slide</a> and <a href="http://www.yelp.com">Yelp</a>)</p>
<h2>Cheetah in a nutshell</h2>
<p>Below is a simple example of some Cheetah code, as you can see it's <em>pretty much</em> 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 :)</p>
<style type="text/css"><!--
                .code_highlighter .hll { background-color: #ffffcc }
.code_highlighter  { background: #f8f8f8; }
.code_highlighter .c { color: #408080; font-style: italic } /* Comment */
.code_highlighter .err { border: 1px solid #FF0000 } /* Error */
.code_highlighter .k { color: #008000; font-weight: bold } /* Keyword */
.code_highlighter .o { color: #666666 } /* Operator */
.code_highlighter .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.code_highlighter .cp { color: #BC7A00 } /* Comment.Preproc */
.code_highlighter .c1 { color: #408080; font-style: italic } /* Comment.Single */
.code_highlighter .cs { color: #408080; font-style: italic } /* Comment.Special */
.code_highlighter .gd { color: #A00000 } /* Generic.Deleted */
.code_highlighter .ge { font-style: italic } /* Generic.Emph */
.code_highlighter .gr { color: #FF0000 } /* Generic.Error */
.code_highlighter .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.code_highlighter .gi { color: #00A000 } /* Generic.Inserted */
.code_highlighter .go { color: #808080 } /* Generic.Output */
.code_highlighter .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.code_highlighter .gs { font-weight: bold } /* Generic.Strong */
.code_highlighter .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.code_highlighter .gt { color: #0040D0 } /* Generic.Traceback */
.code_highlighter .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.code_highlighter .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.code_highlighter .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.code_highlighter .kp { color: #008000 } /* Keyword.Pseudo */
.code_highlighter .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.code_highlighter .kt { color: #B00040 } /* Keyword.Type */
.code_highlighter .m { color: #666666 } /* Literal.Number */
.code_highlighter .s { color: #BA2121 } /* Literal.String */
.code_highlighter .na { color: #7D9029 } /* Name.Attribute */
.code_highlighter .nb { color: #008000 } /* Name.Builtin */
.code_highlighter .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.code_highlighter .no { color: #880000 } /* Name.Constant */
.code_highlighter .nd { color: #AA22FF } /* Name.Decorator */
.code_highlighter .ni { color: #999999; font-weight: bold } /* Name.Entity */
.code_highlighter .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.code_highlighter .nf { color: #0000FF } /* Name.Function */
.code_highlighter .nl { color: #A0A000 } /* Name.Label */
.code_highlighter .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.code_highlighter .nt { color: #008000; font-weight: bold } /* Name.Tag */
.code_highlighter .nv { color: #19177C } /* Name.Variable */
.code_highlighter .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.code_highlighter .w { color: #bbbbbb } /* Text.Whitespace */
.code_highlighter .mf { color: #666666 } /* Literal.Number.Float */
.code_highlighter .mh { color: #666666 } /* Literal.Number.Hex */
.code_highlighter .mi { color: #666666 } /* Literal.Number.Integer */
.code_highlighter .mo { color: #666666 } /* Literal.Number.Oct */
.code_highlighter .sb { color: #BA2121 } /* Literal.String.Backtick */
.code_highlighter .sc { color: #BA2121 } /* Literal.String.Char */
.code_highlighter .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.code_highlighter .s2 { color: #BA2121 } /* Literal.String.Double */
.code_highlighter .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.code_highlighter .sh { color: #BA2121 } /* Literal.String.Heredoc */
.code_highlighter .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.code_highlighter .sx { color: #008000 } /* Literal.String.Other */
.code_highlighter .sr { color: #BB6688 } /* Literal.String.Regex */
.code_highlighter .s1 { color: #BA2121 } /* Literal.String.Single */
.code_highlighter .ss { color: #19177C } /* Literal.String.Symbol */
.code_highlighter .bp { color: #008000 } /* Name.Builtin.Pseudo */
.code_highlighter .vc { color: #19177C } /* Name.Variable.Class */
.code_highlighter .vg { color: #19177C } /* Name.Variable.Global */
.code_highlighter .vi { color: #19177C } /* Name.Variable.Instance */
.code_highlighter .il { color: #666666 } /* Literal.Number.Integer.Long */
            --></style>

<div class="code_highlighter"><pre>#from Cheetah.Template import Template
#extends Template

#set $people = [{&#39;name&#39; : &#39;Tom&#39;, &#39;mood&#39; : &#39;Happy&#39;}, {&#39;name&#39; : &#39;Dick&#39;, &#39;mood&#39; : &#39;Sad&#39;}, {&#39;name&#39; : &#39;Harry&#39;, &#39;mood&#39; : &#39;Hairy&#39;}]
<span class="nt">&lt;strong&gt;</span>How are you feeling?<span class="nt">&lt;/strong&gt;</span>
<span class="nt">&lt;ul&gt;</span>
    #for $person in $people
        <span class="nt">&lt;li&gt;</span>
            $person[&#39;name&#39;] is $person[&#39;mood&#39;]
        <span class="nt">&lt;/li&gt;</span>
    #end for
<span class="nt">&lt;/ul&gt;</span>
</pre></div>

<h2>Why should I use Cheetah?</h2>
<ul>
<li>Cheetah is supported by every major Python web framework.</li>
<li>It is fully documented and is supported by an active user community.</li>
<li>It can output/generate any text-based format.</li>
<li>Cheetah compiles templates into optimized, yet readable, Python code.</li>
<li>It blends the power and flexibility of Python with a simple template language that non-programmers can understand. </li>
<li>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. </li>
<li>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. </li>
<li>It provides a simple, yet powerful, caching mechanism that can dramatically improve the performance of a dynamic website. </li>
<li>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. </li>
<li>Cheetah can be used to generate static html via its command-line tool.</li>
</ul>
<h2>Why Community Cheetah?</h2>
<p>The primary motivations for the Community Cheetah fork is to maintain <em>active</em> development outside of 
the currently-stale <a href="http://sourceforge.net/scm/?type=cvs&amp;group_id=28961">Cheetah CVS tree</a>. 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 <strong>monthly</strong> releases incorporating
patches and improvements to the engine.</p>
        </div>

        <div id="rightcontent">
            <img style="margin-top:-9px; margin-left: -5px;" src="images/top2.jpg" alt="" />
            
                <div id="twitter_div">
        <h2 class="sidebar-title">Twitter Updates</h2>
        <ul id="twitter_update_list"></ul>

        <a href="http://twitter.com/cheetahtemplate" id="twitter-link" style="display:block;text-align:right;">follow Cheetah on Twitter</a>
    </div>


            <img style="padding-top:5px; margin-left:-5px; margin-bottom:-4px;" src="images/specs_bottom.jpg" alt="" />
        </div>

        <br clear="all"/>
        <br/>

            <a href="http://www.python.org" target="_blank"><img src="images/python-logo.gif" border="0" alt="Python-powered" title="Python-powered" align="right"/></a>
    <br clear="all"/>
    <br/>
    <div id="footer">
        &copy; 2006 Design by <a href="http://www.studio7designs.com">Studio7designs.com</a>
    </div>


        <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
        <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/cheetahtemplate.json?callback=twitterCallback2&count=5"></script> 
	</body>
</html>