Debian Codegraph @

README.rst

raw
1 Cheetah Template 3.4.0
2 ======================
3
4 Cheetah3 is a free and open source (MIT) Python template engine.
5 It's a fork of the original CheetahTemplate library.
6
7 Python 2.7 or 3.4+ is required.
8
9
10 Where is CheetahTemplate3
11 =========================
12
13 Site:
14 https://cheetahtemplate.org/
15
16 Download:
17 https://pypi.org/project/CT3/
18
19 News and changes:
20 https://cheetahtemplate.org/news.html
21
22 StackOverflow:
23 https://stackoverflow.com/questions/tagged/cheetah
24
25 Mailing lists:
26 https://sourceforge.net/p/cheetahtemplate/mailman/
27
28 Development:
29 https://github.com/CheetahTemplate3
30
31 Developer Guide:
32 https://cheetahtemplate.org/dev_guide/
33
34
35 Example
36 =======
37
38 Install::
39
40 $ pip install CT3 # (or even "ct3")
41
42 Below is a simple example of some Cheetah code, as you can see it's practically
43 Python. You can import, inherit and define methods just like in a regular Python
44 module, since that's what your Cheetah templates are compiled to :) ::
45
46 #from Cheetah.Template import Template
47 #extends Template
48
49 #set $people = [{'name' : 'Tom', 'mood' : 'Happy'}, {'name' : 'Dick',
50 'mood' : 'Sad'}, {'name' : 'Harry', 'mood' : 'Hairy'}]
51
52 <strong>How are you feeling?</strong>
53 <ul>
54 #for $person in $people
55 <li>
56 $person['name'] is $person['mood']
57 </li>
58 #end for
59 </ul>