CheetahTemplate: Difference between revisions
SimLibrarian (talk | contribs) m Added short description Tags: Mobile edit Mobile app edit iOS app edit App description add |
minor text edit |
||
Line 21: | Line 21: | ||
| website = {{url|https://cheetahtemplate.org/}} |
| website = {{url|https://cheetahtemplate.org/}} |
||
}} |
}} |
||
'''Cheetah''' (or '''CheetahTemplate''') is a [[template processor|template engine]] that uses the [[Python (programming language)|Python programming language]]. It can be used standalone or combined with other tools and frameworks. It is often used for [[server-side scripting]] and [[dynamic web content]] by generating [[HTML]], but can also be used to [[Automatic programming|generate source code]]. Cheetah is [[Free software|free]] |
'''Cheetah''' (or '''CheetahTemplate''') is a [[template processor|template engine]] that uses the [[Python (programming language)|Python programming language]]. It can be used standalone or combined with other tools and frameworks. It is often used for [[server-side scripting]] and [[dynamic web content]] by generating [[HTML]], but can also be used to [[Automatic programming|generate source code]]. Cheetah is [[Free software|free]] [[open-source software]] licensed under the [[MIT License]]. |
||
Templating engines encourage clean separation of content, graphic design, and program code. This leads to more modular, flexible, and reusable site architectures, shorter development time, and code that is easier to understand and maintain. Cheetah compiles templates into optimized, yet readable, Python code. It gives template authors full access to any Python data, and functionality, while providing a way for administrators to selectively restrict access to Python when needed. |
Templating engines encourage clean separation of content, graphic design, and program code. This leads to more modular, flexible, and reusable site architectures, shorter development time, and code that is easier to understand and maintain. Cheetah compiles templates into optimized, yet readable, Python code. It gives template authors full access to any Python data, and functionality, while providing a way for administrators to selectively restrict access to Python when needed. |
Revision as of 00:35, 30 October 2024
This article needs additional citations for verification. (May 2017) |
Original author(s) | Tavis Rudd |
---|---|
Developer(s) | Oleg Broytman |
Initial release | June 2001[1] |
Stable release | 3.3.3
/ October 22, 2023 |
Preview release | 3.3.4a0
/ October 22, 2023 |
Written in | Python |
Operating system | Cross-platform |
Type | Template processor |
License | MIT License |
Website | cheetahtemplate |
Cheetah (or CheetahTemplate) is a template engine that uses the Python programming language. It can be used standalone or combined with other tools and frameworks. It is often used for server-side scripting and dynamic web content by generating HTML, but can also be used to generate source code. Cheetah is free open-source software licensed under the MIT License.
Templating engines encourage clean separation of content, graphic design, and program code. This leads to more modular, flexible, and reusable site architectures, shorter development time, and code that is easier to understand and maintain. Cheetah compiles templates into optimized, yet readable, Python code. It gives template authors full access to any Python data, and functionality, while providing a way for administrators to selectively restrict access to Python when needed.
Cheetah is included in the FreeBSD Ports collection and several Linux distributions: Gentoo, Fedora, Debian, and Ubuntu among others.
Example of Cheetah code
#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>
References
- ^ Rudd, Tavis (June 10, 2001). "0.9.5". CheetahTemplate.
- ^ Cheetah in a nutshell
External links
- Official website
- ONLamp.com tutorial Archived 2006-06-16 at the Wayback Machine
- Dev Shed tutorial