root / test.py

Revision 16:2e6cee916f99, 312 bytes (checked in by Richard Davies <richard.davies@…>, 4 months ago)

Update for Genshi 0.5.1

Line 
1from ghrml import GHRMLTemplate
2
3
4print GHRMLTemplate("""
5
6- foo = 42
7
8%html
9  [def bar()] 42
10
11  %head
12    %title $title - $foo
13
14  %body
15    %p{'id': 'foo'}
16      Hello World
17    %ul
18      %li[for item in seq] $item
19    ${bar()}
20
21""").generate(title="Page Title", seq=range(10)).render("xhtml", doctype='xhtml')
Note: See TracBrowser for help on using the browser.