Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Oleg Broytman Newsgroups: comp.lang.python.announce Subject: Cheetah 3.0.1 Date: Tue, 27 Feb 2018 22:20:08 +0100 Lines: 68 Approved: python-announce-list@python.org Message-ID: References: <20180227212008.mlz57d7kgcxc6mab@phdru.name> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.uni-berlin.de 9yWeAXy4GXOMQWvq/xdDrAwXPJ/iDC0JsZTpISXXDK4w== Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'url:pypi': 0.03; 'url- ip:192.30.253.112/32': 0.07; 'url-ip:192.30.253.113/32': 0.07; 'url-ip:192.30.253/24': 0.07; 'url:github': 0.07; 'practically': 0.09; 'template': 0.12; 'python.': 0.13; '2.7': 0.13; 'url- ip:192.30/16': 0.13; 'python': 0.15; 'compiler.': 0.16; 'email addr:phdru.name': 0.16; 'email name:phd': 0.16; 'header:X-Face:1': 0.16; 'url:tagged': 0.16; 'bug': 0.17; 'hello!': 0.20; 'to:2**1': 0.23; 'fix': 0.24; 'import': 0.24; 'header:User-Agent:1': 0.25; 'url-ip:192.30.252.153/32': 0.25; 'url-ip:192.30.252/24': 0.25; 'url-ip:151.101.0.223/32': 0.26; 'url-ip:151.101.128.223/32': 0.26; 'url-ip:151.101.192.223/32': 0.26; 'url- ip:151.101.64.223/32': 0.26; 'url-ip:151.101.0/24': 0.26; 'url- ip:151.101.128/24': 0.26; 'url-ip:151.101.192/24': 0.26; 'url- ip:151.101.64/24': 0.26; 'code,': 0.28; 'announce': 0.31; 'programmers': 0.31; '3.0': 0.31; 'library.': 0.31; 'module,': 0.31; 'fork': 0.32; 'skip:= 20': 0.32; "i'm": 0.33; 'define': 0.33; 'required.': 0.34; 'url-ip:151.101/16': 0.34; 'url- ip:151/8': 0.34; 'source': 0.35; 'open': 0.35; 'url- ip:188.166/16': 0.35; 'branch': 0.37; 'url-ip:192/8': 0.37; 'charset:us-ascii': 0.38; 'example': 0.38; 'url-ip:188/8': 0.38; 'url:python': 0.39; 'url:org': 0.39; 'templates': 0.40; 'your': 0.60; 'engine.': 0.61; 'news': 0.62; 'free': 0.62; 'sfxlen:3': 0.62; 'url:0': 0.63; 'received:188': 0.67; 'skip:= 30': 0.67; 'url-ip:151.101.1.69/32': 0.67; 'url-ip:151.101.129.69/32': 0.67; 'url-ip:151.101.193.69/32': 0.67; 'url-ip:151.101.65.69/32': 0.67; 'url:questions': 0.67; 'site:': 0.71; 'url:stackoverflow': 0.79; 'inherit': 0.84; 'received:188.166': 0.95 Content-Disposition: inline X-Attribution: phd X-Face: "4chVP^f8; 3Bi>x"ic0%DuP(ZLyn:; kzQ1njs]5,GRZG<{<\~`|Shxi7|)d|8uO~HFRfyym {[xs@OYG]2Q]0#}0sjJp`1^1+B6]A2+{9fW=S, Python Mailing List X-Skip-DKIM-Sig: mailing list User-Agent: NeoMutt/20170113 (1.7.2) X-Mailman-Approved-At: Wed, 28 Feb 2018 08:05:05 -0500 X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20180227212008.mlz57d7kgcxc6mab@phdru.name> Xref: csiph.com comp.lang.python.announce:2778 Hello! I'm pleased to announce version 3.0.1, the first bugfix release of branch 3.0 of CheetahTemplate3. What's new in CheetahTemplate3 ============================== Bug fixes: - Fix a minor bug in Compiler. What is CheetahTemplate3 ======================== Cheetah3 is a free and open source template engine. It's a fork of the original CheetahTemplate library. Python 2.7 or 3.3+ is required. Where is CheetahTemplate3 ========================= Site: http://cheetahtemplate.org/ Development: https://github.com/CheetahTemplate3 Download: https://pypi.python.org/pypi/Cheetah3/3.0.1 News and changes: http://cheetahtemplate.org/news.html StackOverflow: https://stackoverflow.com/questions/tagged/cheetah Example ======= Below is a simple example of some Cheetah code, as you can see it's practically 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 :) :: #from Cheetah.Template import Template #extends Template #set $people = [{'name' : 'Tom', 'mood' : 'Happy'}, {'name' : 'Dick', 'mood' : 'Sad'}, {'name' : 'Harry', 'mood' : 'Hairy' How are you feeling?
    #for $person in $people
  • $person['name'] is $person['mood']
  • #end for
Oleg. -- Oleg Broytman http://phdru.name/ phd@phdru.name Programmers don't die, they just GOSUB without RETURN.