File: tutorial2.kid

package info (click to toggle)
kid 0.6.3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 588 kB
  • ctags: 588
  • sloc: python: 2,447; makefile: 5; xml: 4
file content (23 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="utf-8"?>
<?python 
# you can treat templates just like python modules
import kid ; kid.enable_import()
from tutorial import display_dict

lil_bears = { 'PHP' : 'Too soft',
              'XSLT' : 'Too hard',
              'Kid' : 'Just right!' }

?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://purl.org/kid/ns#">
  <head>
    <title>Let's use that template function</title>
  </head>
  <body>
    <h1>Here's a table of stuff</h1>

    ${display_dict('Template Language', 'Rating', lil_bears)}

  </body>
</html>