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>
|