summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authortavis_rudd <tavis_rudd>2001-06-13 03:50:36 +0000
committertavis_rudd <tavis_rudd>2001-06-13 03:50:36 +0000
commit32567d843c4f6be31453904b60e7863b9e889d25 (patch)
tree21d5d8f60f7b3226d517c6721f355620edb19a12 /examples
downloadpython-cheetah-32567d843c4f6be31453904b60e7863b9e889d25.tar.gz
Initial revision
Diffstat (limited to 'examples')
-rw-r--r--examples/webware_examples/cheetahSite/SiteTemplate.tmpl427
-rw-r--r--examples/webware_examples/cheetahSite/banner copy.jpgbin0 -> 23108 bytes
-rw-r--r--examples/webware_examples/cheetahSite/banner2.jpgbin0 -> 18926 bytes
-rw-r--r--examples/webware_examples/cheetahSite/banner3.jpgbin0 -> 16867 bytes
-rw-r--r--examples/webware_examples/cheetahSite/banner_cheetah.jpgbin0 -> 13047 bytes
-rw-r--r--examples/webware_examples/cheetahSite/banner_text.gifbin0 -> 1978 bytes
-rw-r--r--examples/webware_examples/cheetahSite/cheetah-face-black-medium.jpgbin0 -> 8734 bytes
-rw-r--r--examples/webware_examples/cheetahSite/cheetah-face-black.jpgbin0 -> 57091 bytes
-rw-r--r--examples/webware_examples/cheetahSite/cheetah-face-black.psdbin0 -> 232109 bytes
-rw-r--r--examples/webware_examples/cheetahSite/cheetah-face-original.jpgbin0 -> 52832 bytes
-rw-r--r--examples/webware_examples/cheetahSite/cheetah-face.jpgbin0 -> 56940 bytes
-rw-r--r--examples/webware_examples/cheetahSite/cheetah-face_medium.jpgbin0 -> 8832 bytes
-rw-r--r--examples/webware_examples/cheetahSite/contribute.tmpl93
-rw-r--r--examples/webware_examples/cheetahSite/download.tmpl33
-rw-r--r--examples/webware_examples/cheetahSite/index.html248
-rw-r--r--examples/webware_examples/cheetahSite/index.tmpl82
-rw-r--r--examples/webware_examples/cheetahSite/learn.html1668
-rw-r--r--examples/webware_examples/cheetahSite/learn.tmpl43
-rw-r--r--examples/webware_examples/cheetahSite/sourceforge_logo.gifbin0 -> 6429 bytes
-rw-r--r--examples/webware_examples/cheetahSite/spacer.gifbin0 -> 43 bytes
-rw-r--r--examples/webware_examples/hello_world.py8
-rw-r--r--examples/webware_examples/webwareSite/WebwareSiteTemplate.tmpl459
-rw-r--r--examples/webware_examples/webwareSite/communicate.tmpl29
-rw-r--r--examples/webware_examples/webwareSite/contribute.tmpl29
-rw-r--r--examples/webware_examples/webwareSite/download.tmpl29
-rw-r--r--examples/webware_examples/webwareSite/index.tmpl138
-rw-r--r--examples/webware_examples/webwareSite/learn.tmpl33
-rw-r--r--examples/webware_examples/webwareSite/onion_blue_on_white.gifbin0 -> 2318 bytes
-rw-r--r--examples/webware_examples/webwareSite/onion_blue_on_white_large.gifbin0 -> 4301 bytes
-rw-r--r--examples/webware_examples/webwareSite/sourceforge_logo.gifbin0 -> 6429 bytes
-rw-r--r--examples/webware_examples/webwareSite/spacer.gifbin0 -> 43 bytes
-rw-r--r--examples/webware_examples/webwareSite/webWare.gifbin0 -> 1616 bytes
-rw-r--r--examples/webware_examples/webwareSite/webWare_blueBG.gifbin0 -> 2673 bytes
-rw-r--r--examples/webware_examples/webwareSite/webWare_subtitle.gifbin0 -> 1166 bytes
-rw-r--r--examples/webware_examples/webwareSite/webonions.gifbin0 -> 1856 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_logo.gifbin0 -> 951 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_slogan_bw.gifbin0 -> 1335 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_subtitle_black.gifbin0 -> 1369 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_subtitle_inner_frame.gifbin0 -> 1364 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_title_bw.gifbin0 -> 1425 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_title_red-white.gifbin0 -> 1481 bytes
-rw-r--r--examples/webware_examples/webwareSite/webware_title_red-white_fat.gifbin0 -> 1626 bytes
42 files changed, 3319 insertions, 0 deletions
diff --git a/examples/webware_examples/cheetahSite/SiteTemplate.tmpl b/examples/webware_examples/cheetahSite/SiteTemplate.tmpl
new file mode 100644
index 0000000..69fd500
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/SiteTemplate.tmpl
@@ -0,0 +1,427 @@
+#extend Cheetah.Templates.SkeletonPage
+
+##============================================================================##
+## macros for the site
+
+#macro Python()
+<A HREF="http://www.python.org">Python</A>
+#end macro
+
+#macro insetBox(width=170, boxTitle='', boxContents='')
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$width>
+ <TR>
+ <TD COLSPAN=3 HEIGHT=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD> ## force full width
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="$mainTbl.innerFrameColor"> ## force full width
+ <DIV CLASS="insetBoxTitleContainer"><DIV CLASS="insetBoxTitle">$boxTitle</DIV></DIV>
+ </TD>
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD> ## force full width
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN=3 HEIGHT=1 BGCOLOR="$*insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE VALIGN="top" WIDTH=$*width BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD WIDTH=1 bgcolor="$*insetBoxes.frameColor">#spacer()</TD>
+ <TD WIDTH=900 BGCOLOR="$*insetBoxes.bgcolor"> ## force to full width
+ ## now begin the contents cell of the insetBox
+ $boxContents
+ ## end insetBox
+ </TD>
+ <TD WIDTH=1 BGCOLOR="$*insetBoxes.frameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$width>
+ <TR>
+ <TD HEIGHT=1 BGCOLOR="$*insetBoxes.frameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+#end macro
+##============================================================================##
+
+
+
+##============================================================================##
+#data
+
+title = "Cheetah - The Python-Powered Template Engine"
+siteDomainName = "cheetahtemplate.sourceforge.net"
+siteCopyrightName= "The Cheetah Development Team"
+
+
+bodyTagAttribs = {"bgcolor": "black",
+ "text":"#000033", #333333
+ }
+
+navBar = {"bgcolor":"#3366CC", #EBEBEB #E0E0E0
+ }
+
+locationBar = {"bgcolor":"#3366CC", #EBEBEB #E0E0E0
+ "frameColor":"#CCCCCC",
+ }
+
+mainTbl = {"width":"90%",
+ "align":"center",
+ "contentsBgColor":"white",
+ "outerFrameColor":"#6699FF", #FFC850 #BDD4F1
+ "innerFrameColor":"#3366CC", #0059B2
+ "innerFrameWidth":8,
+ }
+
+insetBoxes = {"width":170,
+ "frameColor":"#DDDDDD", #000033
+ "titleFrameColor":"black", #000033
+ "bgcolor":"#FAFAFA",
+ }
+
+
+_sanSerifFonts = """helvetica, arial, "lucida sans", sans-serif"""
+
+_stylesheets = {
+ "H1.mainText": {"margin":"7px 2px",
+ "font-size":"small",
+ "font-weight":"bold",
+ "font-family": _sanSerifFonts,
+ },
+ "P, .mainText": {"margin-left":"10px"},
+
+ ".navBarContainer": {"padding": "4px 0px", "color":"white"},
+ ".navBar, A.navBar:link, A.navBar:visited": {"font-size":"small",
+ "font-weight":"bold",
+ "color":"white",
+ "text-decoration":"none",
+ "font-family": _sanSerifFonts,
+ },
+ "A.navBar:hover, A.navBar:active": {"text-decoration":"underline"},
+
+ ".locationBarContainer": {"padding": "2px 10px"},
+ ".locationBar, A.locationBar:link, A.locationBar:visited": {"font-size":"x-small",
+ "color":"#666666",
+ "text-decoration":"none",
+ "font-family": _sanSerifFonts,
+ },
+ "A.locationBar:hover, A.locationBar:active": {"text-decoration":"underline"},
+
+ ".copyrightFooter": {"color":"white", "font-size":"9pt"},
+
+ ".insetBoxTitleContainer":{"padding": "2px 5px",
+ "color":"white",
+ "font-weight":"bold",
+ },
+ ".insetBoxTitle":{"color":"white",
+ "font-size":"x-small",
+ "font-weight":"bold",
+ "text-decoration":"none",
+ "font-family": _sanSerifFonts,
+ },
+ ".insetBoxContainer":{"padding": "2px 2px 2px 5px"},
+ ".insetBox":{"font-size":"x-small",
+ "font-family": _sanSerifFonts,
+ },
+ "H1.insetBox":{"margin": "5px 5px",
+ "padding": "0px",
+ "font-size":"x-small",
+ "font-weight":"bold",
+ "font-family": _sanSerifFonts
+ },
+
+ "P.insetBox":{"margin": "2px 5px 7px 10px",
+ "padding": "0px",
+ "font-family": _sanSerifFonts
+ },
+ "A.insetBox:link, A.insetBox:visited":{"font-size":"x-small",
+ "text-decoration":"none",
+ },
+ "A.insetBox:hover, A.insetBox:active": {"text-decoration":"underline"},
+
+ ".listItems": {"margin-bottom":"200px"},
+ }
+
+_stylesheetsOrder = ["H1.mainText",
+ "P, .mainText",
+ ".navBarContainer",
+ ".navBar, A.navBar:link, A.navBar:visited",
+ "A.navBar:hover, A.navBar:active",
+ ".locationBarContainer",
+ ".locationBar, A.locationBar:link, A.locationBar:visited",
+ "A.locationBar:hover, A.locationBar:active",
+ ".copyrightFooter",
+ ".insetBoxTitleContainer",
+ ".insetBoxTitle",
+ ".insetBoxContainer",
+ ".insetBox",
+ "H1.insetBox",
+ "P.insetBox",
+ "A.insetBox:link, A.insetBox:visited",
+ "A.insetBox:hover, A.insetBox:active",
+ ".listItems",
+ ]
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from SkeletonPage
+#redefine bodyContents
+
+#####################
+#block header
+
+#end block header
+#####################
+
+<TABLE ALIGN=$*mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$*mainTbl.width>
+ <TR>
+ <TD>
+ #####################
+ #block mainTblOuterHeader
+ <DIV ALIGN="center"><IMG SRC="cheetah-face-black-medium.jpg"
+ ALT="">#spacer(35)<IMG SRC="banner_text.gif"
+ ALT="Cheetah: The Python-Powered Template Engine"></DIV>
+ ##spacer(1,10)
+
+ #end block mainTblOuterHeader
+ #####################
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 bgcolor="$*mainTbl.outerFrameColor">#spacer()</TD>
+ ## top line of the mainTbl frame
+ </TR>
+</TABLE>
+
+
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 bgcolor="$*mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=900> ## force to full width in Netscape
+ #####################
+ #block mainTblInnerHeader
+
+ ##############
+ #block navBar
+ <TABLE WIDTH=100% BGCOLOR="$*navBar.bgcolor" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+#macro navDivider()
+#spacer(35)|#spacer(35)
+#end macro
+
+ <DIV ALIGN="center" CLASS="navBarContainer">
+ <A CLASS="navBar" HREF="index.html">Home</A>#navDivider()
+ <A CLASS="navBar" HREF="learn.html">Learn</A>#navDivider()
+ <A CLASS="navBar" HREF="download.html">Download</A>#navDivider()
+ <A CLASS="navBar" HREF="contribute.html">Contribute</A>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ #end block navBar
+ ##############
+
+ #end block mainTblInnerHeader
+ #####################
+ </TD>
+ <TD WIDTH="1" bgcolor="$*mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=$*mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$*mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=$*mainTbl.innerFrameWidth bgcolor="$*mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="black">#spacer(100)</TD> ## force to full width in Netscape
+ <TD WIDTH=$*mainTbl.innerFrameWidth bgcolor="$*mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH="1" BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+
+## MainTbl - contents ##
+
+<TABLE ALIGN=$*mainTbl.align VALIGN="top" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$*mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=$*mainTbl.innerFrameWidth bgcolor="$*mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH=1 BGCOLOR="black">#spacer()</TD>
+
+ <TD BGCOLOR="$*mainTbl.contentsBgColor">
+
+ ###################
+ #block locationBar
+ <TABLE WIDTH=100% BGCOLOR="#EBEBEB" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+ <DIV CLASS="locationBarContainer">
+ ###################
+ #block locationBarContents
+ <A CLASS="locationBar" HREF="index.html">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="download.html">Download</A>
+ #end block locationBarContents
+ ###################
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD HEIGHT=1 BGCOLOR="$*locationBar.frameColor">#spacer()</TD>
+ </TR>
+ </TABLE>
+
+ #end block locationBar
+ ###################
+
+
+
+ ######################
+ #block mainTblContents
+
+ #spacer(1,25)
+
+ <TABLE VALIGN="top" WIDTH=100% BORDER=0 CELLPADDING=10 CELLSPACING=0>
+ <TR>
+ <TD VALIGN="top">
+ ################
+ #block leftSideBar
+
+ ##<DIV ALIGN="center"><IMG SRC="cheetah-face_medium.jpg" ALT="" BORDER=3></DIV>
+ ##<BR>
+
+ #*
+ ##======================================
+ #callMacro insetBox(boxTitle="Sections")
+ #arg boxContents
+ <DIV CLASS="insetBox">
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="learn">Learn</A></H1>
+ <P CLASS="insetBox">
+ Users Guide<BR>
+ Tutorials<BR>
+ Tips and Tricks<BR>
+ Articles<BR>
+ Language Comparisons<BR>
+ Developer Information<BR>
+ </P>
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="download">Download</A></H1>
+ <P CLASS="insetBox">
+ Stable Releases<BR>
+ CVS Snapshots<BR>
+ Third-Party Packages<BR>
+ Browse the CVS<BR>
+ </P>
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="contribute">Contribute</A></H1>
+ <P CLASS="insetBox">
+ Join the Mailing Lists<BR>
+ Links to Webware Sites<BR>
+ Bug Reports<BR>
+ Patches and New Code<BR>
+ Tutorials<BR>
+ Tips and Tricks<BR>
+ Articles<BR>
+ Language Comparisons<BR>
+ </P>
+ </DIV> ## end insetBox
+ #end arg
+ #end callMacro
+ ##======================================
+ *#
+
+ #end block leftSideBar
+ ################
+
+ </TD>
+ <TD VALIGN="top">
+ ########################
+ #block mainContentsCell
+ #end block mainContentsCell
+ ########################
+ </TD>
+ </TR>
+ </TABLE>
+
+ #spacer(1,200)
+ #end block mainTblContents
+ ######################
+ </TD>
+
+ <TD WIDTH=1 BGCOLOR="black">#spacer()</TD>
+ <TD WIDTH=$*mainTbl.innerFrameWidth BGCOLOR="$*mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH="1" BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+
+## MainTbl - closure ##
+<TABLE ALIGN=$*mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$*mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=$*mainTbl.innerFrameWidth bgcolor="$*mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH=900 BGCOLOR="black">#spacer(100)</TD> ## force to full width in Netscape
+ <TD WIDTH=$*mainTbl.innerFrameWidth bgcolor="$*mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH="1" BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=$*mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$*mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=900 BGCOLOR="$*mainTbl.innerFrameColor">#spacer(1,25)</TD> ## force to full width in Netscape
+ <TD WIDTH="1" BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=$*mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$*mainTbl.width>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 BGCOLOR="$*mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD>
+ #####################
+ #block mainTblOuterFooter
+ <DIV CLASS="copyrightFooter">
+ Copyright &copy; #currentYr() $*siteCopyrightName. All rights reserved.
+ </DIV>
+ <BR>
+
+ <DIV CLASS="copyrightFooter" ALIGN="center">Hosted on<BR>
+ <a href=http://sourceforge.net><img
+ src=http://sourceforge.net/sflogo.php?group_id=28961&type=1"
+ alt="SourceForge Home" height=31 width=88 border=0></a>
+ </DIV>
+
+ #end block mainTblOuterFooter
+ #####################
+ </TD>
+ </TR>
+</TABLE>
+
+
+#####################
+#block footer
+<BR>
+<BR>
+<BR>
+#end block footer
+#####################
+
+
+#end redefine bodyContents
+## from SkeletonPage
+##============================================================================##
diff --git a/examples/webware_examples/cheetahSite/banner copy.jpg b/examples/webware_examples/cheetahSite/banner copy.jpg
new file mode 100644
index 0000000..173f8c6
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/banner copy.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/banner2.jpg b/examples/webware_examples/cheetahSite/banner2.jpg
new file mode 100644
index 0000000..44face0
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/banner2.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/banner3.jpg b/examples/webware_examples/cheetahSite/banner3.jpg
new file mode 100644
index 0000000..8b48927
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/banner3.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/banner_cheetah.jpg b/examples/webware_examples/cheetahSite/banner_cheetah.jpg
new file mode 100644
index 0000000..acb4439
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/banner_cheetah.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/banner_text.gif b/examples/webware_examples/cheetahSite/banner_text.gif
new file mode 100644
index 0000000..98f33db
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/banner_text.gif
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/cheetah-face-black-medium.jpg b/examples/webware_examples/cheetahSite/cheetah-face-black-medium.jpg
new file mode 100644
index 0000000..fb4ad32
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/cheetah-face-black-medium.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/cheetah-face-black.jpg b/examples/webware_examples/cheetahSite/cheetah-face-black.jpg
new file mode 100644
index 0000000..ace02c8
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/cheetah-face-black.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/cheetah-face-black.psd b/examples/webware_examples/cheetahSite/cheetah-face-black.psd
new file mode 100644
index 0000000..7c765c6
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/cheetah-face-black.psd
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/cheetah-face-original.jpg b/examples/webware_examples/cheetahSite/cheetah-face-original.jpg
new file mode 100644
index 0000000..a63cd21
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/cheetah-face-original.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/cheetah-face.jpg b/examples/webware_examples/cheetahSite/cheetah-face.jpg
new file mode 100644
index 0000000..dace106
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/cheetah-face.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/cheetah-face_medium.jpg b/examples/webware_examples/cheetahSite/cheetah-face_medium.jpg
new file mode 100644
index 0000000..261888b
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/cheetah-face_medium.jpg
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/contribute.tmpl b/examples/webware_examples/cheetahSite/contribute.tmpl
new file mode 100644
index 0000000..6256758
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/contribute.tmpl
@@ -0,0 +1,93 @@
+#extend SiteTemplate
+
+##============================================================================##
+#data
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from SiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.html">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="contribute.html">Contribute</A>
+#end redefine locationBarContents
+##============================================================================##
+
+
+##============================================================================##
+## from SiteTemplate
+#redefine mainContentsCell
+
+<H2>How can I contribute?
+</H2>
+
+<P> Cheetah is the work of many volunteers. If you use Cheetah, share
+your experiences, tricks, customizations, and frustrations. Please join the <a
+href=http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss>mailing
+list</a>.
+
+<P>
+
+<H3>Bug reports and patches</A>
+</H3>
+
+<P>
+If you think there is a bug in Cheetah, send a message to the email list
+with the following information:
+
+<P>
+
+<OL>
+<LI>a description of what you were trying to do and what happened
+</LI>
+<LI>all tracebacks and error output
+</LI>
+<LI>your version of Cheetah
+</LI>
+<LI>your version of Python
+</LI>
+<LI>your operating system
+</LI>
+<LI>whether you have changed anything in the Cheetah installation
+</LI>
+</OL>
+
+<P>
+
+<H3>Example sites and tutorials</A>
+</H3>
+If you're developing a website with Cheetah, please send a link to the
+email list so we can keep track of Cheetah sites. Also, if you discover
+new and interesting ways to use Cheetah please share your experience and
+write a quick tutorial about your technique.
+
+<P>
+
+<H3>Macro libraries</A></H3>
+We hope to build up a framework of macros
+libraries (see the Users Guide) to distribute with Cheetah and would
+appreciate any contributions.
+
+<P>
+
+<H3>Test cases</A>
+</H3>
+Cheetah is packaged with a regression testing suite that is run with each
+new release to ensure that everything is working as expected and that recent
+changes haven't broken anything. The test cases are in the Cheetah.Tests
+module. If you find a reproduceable bug please consider writing a test case
+that will pass only when the bug is fixed. Send any new test cases to the email
+list with the subject-line ``new test case for Cheetah.''
+
+<P>
+
+<H3>Publicity</A>
+</H3>
+Help spread the word ... recommend it to others, write articles about it, etc.
+
+<P>
+
+#end redefine mainContentsCell
+##============================================================================##
diff --git a/examples/webware_examples/cheetahSite/download.tmpl b/examples/webware_examples/cheetahSite/download.tmpl
new file mode 100644
index 0000000..688f18e
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/download.tmpl
@@ -0,0 +1,33 @@
+#extend SiteTemplate
+
+##============================================================================##
+#data
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.html">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="download.html">Download Cheetah</A>
+#end redefine locationBarContents
+## from WebwareSiteTemplate
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine mainContentsCell
+
+<P>
+<A HREF="Downloads/Cheetah-LATEST.tar.gz">Here</A> is the current Cheetah
+release (0.9.6).
+
+<P>
+And <A HREF="Downloads/">here</A> are all the recent Cheetah releases.
+
+#end redefine mainContentsCell
+## from WebwareSiteTemplate
+##============================================================================##
diff --git a/examples/webware_examples/cheetahSite/index.html b/examples/webware_examples/cheetahSite/index.html
new file mode 100644
index 0000000..3af64b7
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/index.html
@@ -0,0 +1,248 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<!-- This document was autogenerated by Cheetah. Don't edit it directly!
+
+Copyright 2001 - The Cheetah Development Team - All Rights Reserved.
+Feel free to copy any javascript or html you like on this site,
+provided you remove all links and/or references to cheetahtemplate.sourceforge.net
+However, please do not copy any content or images without permission.
+
+Designed & Implemented by Tavis Rudd
+
+-->
+
+
+
+<HEAD>
+<TITLE>Cheetah - The Python-Powered Template Engine</TITLE>
+
+<STYLE TYPE="text/css"><!--
+
+H1.mainText {font-family: helvetica, arial, "lucida sans", sans-serif; margin: 7px 2px; font-weight: bold; font-size: small}
+P, .mainText {margin-left: 10px}
+.navBarContainer {color: white; padding: 4px 0px}
+.navBar, A.navBar:link, A.navBar:visited {text-decoration: none; font-family: helvetica, arial, "lucida sans", sans-serif; font-weight: bold; font-size: small; color: white}
+A.navBar:hover, A.navBar:active {text-decoration: underline}
+.locationBarContainer {padding: 2px 10px}
+.locationBar, A.locationBar:link, A.locationBar:visited {text-decoration: none; font-family: helvetica, arial, "lucida sans", sans-serif; font-size: x-small; color: #666666}
+A.locationBar:hover, A.locationBar:active {text-decoration: underline}
+.copyrightFooter {font-size: 9pt; color: white}
+.insetBoxTitleContainer {padding: 2px 5px; font-weight: bold; color: white}
+.insetBoxTitle {text-decoration: none; font-family: helvetica, arial, "lucida sans", sans-serif; font-weight: bold; font-size: x-small; color: white}
+.insetBoxContainer {padding: 2px 2px 2px 5px}
+.insetBox {font-family: helvetica, arial, "lucida sans", sans-serif; font-size: x-small}
+H1.insetBox {font-family: helvetica, arial, "lucida sans", sans-serif; margin: 5px 5px; font-weight: bold; font-size: x-small; padding: 0px}
+P.insetBox {margin: 2px 5px 7px 10px; font-family: helvetica, arial, "lucida sans", sans-serif; padding: 0px}
+A.insetBox:link, A.insetBox:visited {text-decoration: none; font-size: x-small}
+A.insetBox:hover, A.insetBox:active {text-decoration: underline}
+.listItems {margin-bottom: 200px}
+//--></STYLE>
+
+</HEAD>
+
+
+
+
+<BODY BGCOLOR="black" TEXT="#000033">
+
+
+
+
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD>
+ <DIV ALIGN="center"><IMG SRC="cheetah-face-black-medium.jpg"
+ ALT=""><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT=""><IMG SRC="banner_text.gif"
+ ALT="Cheetah: The Python-Powered Template Engine"></DIV>
+
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 bgcolor="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 bgcolor="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900>
+
+ <TABLE WIDTH=100% BGCOLOR="#3366CC" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+
+ <DIV ALIGN="center" CLASS="navBarContainer">
+ <A CLASS="navBar" HREF="index.html">Home</A><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">|<IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
+ <A CLASS="navBar" HREF="learn.html">Learn</A><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">|<IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
+ <A CLASS="navBar" HREF="download.html">Download</A><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">|<IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
+ <A CLASS="navBar" HREF="contribute.html">Contribute</A>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+
+ </TD>
+ <TD WIDTH="1" bgcolor="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=100 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+
+
+<TABLE ALIGN=center VALIGN="top" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=1 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+
+ <TD BGCOLOR="white">
+
+
+
+
+
+
+ <IMG SRC="spacer.gif" WIDTH=1 HEIGHT=25 ALT="">
+
+ <TABLE VALIGN="top" WIDTH=100% BORDER=0 CELLPADDING=10 CELLSPACING=0>
+ <TR>
+ <TD VALIGN="top">
+ <BR>
+ <a href=http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss><B>Mailing
+ List</B></a><BR>
+ <A HREF="http://sourceforge.net/cvs/?group_id=28961"><B>CVS</B></A><BR>
+
+ </TD>
+ <TD VALIGN="top">
+
+<P>
+<B>Cheetah</B> is a <A HREF="http://www.python.org">Python</A>-powered template engine and code-generator. It aims to:
+<ul>
+ <li> make it easy to separate content, graphic design, and program code.
+ <li> make it easy to integrate content, graphic design, and program code.
+ <li> provide template designers with a small set of <i>display
+ logic</i> programming structures such as conditional blocks and for loops
+ <li> be equally well-suited for any text format including HTML,
+ SGML, XML, SQL, Postscript, e-mail and LaTeX
+ <li> achieve all these aims in a manner that is efficient, flexible, and extendable.
+</ul>
+</P>
+
+
+<P>
+<B>Cheetah</B> achieves these aims by:
+
+<UL>
+<LI>blending the power and flexibility of Python with the simplicity of a
+ small Template Definition language that non-programmers can understand.
+<LI>giving template designers a simple way of accessing Python variables,
+ objects, and functions in their templates.
+
+<LI>providing a modular, object-orientated framework that makes it easy to
+ create and maintain large websites.
+
+<LI>compiling 'Template Definitions' into native Python code at startup.
+ Thereafter this code is executed for each request. This approach is
+ dramatically faster than the string substitution approach used by many
+ templating engines.
+
+</LI>
+<LI>providing a very simple, yet powerful, caching mechanism that can
+ significantly increase the responsiveness of a dynamic website.
+</LI>
+</UL>
+
+<P><B>Cheetah</B> requires <A HREF="http://www.python.org">Python</A> 2.0 or greater. It can be used from ordinary Python
+programs, but also provides integration with <a
+href=http://webware.sourceforge.net/>Webware for Python</a>.</P>
+
+<P><B>Cheetah</B> is Open Source Software, released under the terms of the Python
+License.
+
+<P><B>Cheetah</B> is alpha software as some aspects of its design are still subject to
+change. We plan to release a stable version later this summer.
+
+<P> The discussion list is
+<a href=mailto:cheetahtemplate-discuss@lists.sourceforge.net
+>cheetahtemplate-discuss@lists.sourceforge.net</a>.
+You can join <a href=http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss>here</a>
+and view the archives <a
+href=http://www.geocrawler.com/redir-sf.php3?list=cheetahtemplate-discuss>here</a>.
+</P>
+
+
+ </TD>
+ </TR>
+ </TABLE>
+
+ <IMG SRC="spacer.gif" WIDTH=1 HEIGHT=200 ALT="">
+ </TD>
+
+ <TD WIDTH=1 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 BGCOLOR="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=100 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900 BGCOLOR="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=25 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV CLASS="copyrightFooter">
+ Copyright &copy; 2001 The Cheetah Development Team. All rights reserved.
+ </DIV>
+ <BR>
+
+ <DIV CLASS="copyrightFooter" ALIGN="center">Hosted on<BR>
+ <a href=http://sourceforge.net><img
+ src=http://sourceforge.net/sflogo.php?group_id=28961&type=1"
+ alt="SourceForge Home" height=31 width=88 border=0></a>
+ </DIV>
+
+ </TD>
+ </TR>
+</TABLE>
+
+
+<BR>
+<BR>
+<BR>
+
+
+
+
+</BODY>
+</HTML>
diff --git a/examples/webware_examples/cheetahSite/index.tmpl b/examples/webware_examples/cheetahSite/index.tmpl
new file mode 100644
index 0000000..d573a07
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/index.tmpl
@@ -0,0 +1,82 @@
+#extend SiteTemplate
+
+###################
+#redefine locationBar
+
+#end redefine locationBar
+###################
+
+
+##============================================================================##
+## from SiteTemplate
+#redefine leftSideBar
+ <BR>
+ <a href=http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss><B>Mailing
+ List</B></a><BR>
+ <A HREF="http://sourceforge.net/cvs/?group_id=28961"><B>CVS</B></A><BR>
+#end redefine leftSideBar
+##============================================================================##
+
+
+########################
+#redefine mainContentsCell
+
+##<H1 CLASS="mainText">What is Cheetah?</H1>
+<P>
+<B>Cheetah</B> is a #Python()-powered template engine and code-generator. It aims to:
+<ul>
+ <li> make it easy to separate content, graphic design, and program code.
+ <li> make it easy to integrate content, graphic design, and program code.
+ <li> provide template designers with a small set of <i>display
+ logic</i> programming structures such as conditional blocks and for loops
+ <li> be equally well-suited for any text format including HTML,
+ SGML, XML, SQL, Postscript, e-mail and LaTeX
+ <li> achieve all these aims in a manner that is efficient, flexible, and extendable.
+</ul>
+</P>
+
+
+<P>
+<B>Cheetah</B> achieves these aims by:
+
+<UL>
+<LI>blending the power and flexibility of Python with the simplicity of a
+ small Template Definition language that non-programmers can understand.
+<LI>giving template designers a simple way of accessing Python variables,
+ objects, and functions in their templates.
+
+<LI>providing a modular, object-orientated framework that makes it easy to
+ create and maintain large websites.
+
+<LI>compiling 'Template Definitions' into native Python code at startup.
+ Thereafter this code is executed for each request. This approach is
+ dramatically faster than the string substitution approach used by many
+ templating engines.
+
+</LI>
+<LI>providing a very simple, yet powerful, caching mechanism that can
+ significantly increase the responsiveness of a dynamic website.
+</LI>
+</UL>
+
+<P><B>Cheetah</B> requires #Python() 2.0 or greater. It can be used from ordinary Python
+programs, but also provides integration with <a
+href=http://webware.sourceforge.net/>Webware for Python</a>.</P>
+
+<P><B>Cheetah</B> is Open Source Software, released under the terms of the Python
+License.
+
+<P><B>Cheetah</B> is alpha software as some aspects of its design are still subject to
+change. We plan to release a stable version later this summer.
+
+<P> The discussion list is
+<a href=mailto:cheetahtemplate-discuss@lists.sourceforge.net
+>cheetahtemplate-discuss@lists.sourceforge.net</a>.
+You can join <a href=http://lists.sourceforge.net/mailman/listinfo/cheetahtemplate-discuss>here</a>
+and view the archives <a
+href=http://www.geocrawler.com/redir-sf.php3?list=cheetahtemplate-discuss>here</a>.
+</P>
+
+
+#end redefine mainContentsCell
+########################
diff --git a/examples/webware_examples/cheetahSite/learn.html b/examples/webware_examples/cheetahSite/learn.html
new file mode 100644
index 0000000..f6c907e
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/learn.html
@@ -0,0 +1,1668 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<!-- This document was autogenerated by Cheetah. Don't edit it directly!
+
+Copyright 2001 - The Cheetah Development Team - All Rights Reserved.
+Feel free to copy any javascript or html you like on this site,
+provided you remove all links and/or references to cheetahtemplate.sourceforge.net
+However, please do not copy any content or images without permission.
+
+Designed & Implemented by Tavis Rudd
+
+-->
+
+
+
+<HEAD>
+<TITLE>Cheetah - The Python-Powered Template Engine</TITLE>
+
+<STYLE TYPE="text/css"><!--
+
+H1.mainText {font-family: helvetica, arial, "lucida sans", sans-serif; margin: 7px 2px; font-weight: bold; font-size: small}
+P, .mainText {margin-left: 10px}
+.navBarContainer {color: white; padding: 4px 0px}
+.navBar, A.navBar:link, A.navBar:visited {text-decoration: none; font-family: helvetica, arial, "lucida sans", sans-serif; font-weight: bold; font-size: small; color: white}
+A.navBar:hover, A.navBar:active {text-decoration: underline}
+.locationBarContainer {padding: 2px 10px}
+.locationBar, A.locationBar:link, A.locationBar:visited {text-decoration: none; font-family: helvetica, arial, "lucida sans", sans-serif; font-size: x-small; color: #666666}
+A.locationBar:hover, A.locationBar:active {text-decoration: underline}
+.copyrightFooter {font-size: 9pt; color: white}
+.insetBoxTitleContainer {padding: 2px 5px; font-weight: bold; color: white}
+.insetBoxTitle {text-decoration: none; font-family: helvetica, arial, "lucida sans", sans-serif; font-weight: bold; font-size: x-small; color: white}
+.insetBoxContainer {padding: 2px 2px 2px 5px}
+.insetBox {font-family: helvetica, arial, "lucida sans", sans-serif; font-size: x-small}
+H1.insetBox {font-family: helvetica, arial, "lucida sans", sans-serif; margin: 5px 5px; font-weight: bold; font-size: x-small; padding: 0px}
+P.insetBox {margin: 2px 5px 7px 10px; font-family: helvetica, arial, "lucida sans", sans-serif; padding: 0px}
+A.insetBox:link, A.insetBox:visited {text-decoration: none; font-size: x-small}
+A.insetBox:hover, A.insetBox:active {text-decoration: underline}
+.listItems {margin-bottom: 200px}
+//--></STYLE>
+
+</HEAD>
+
+
+
+
+<BODY BGCOLOR="black" TEXT="#000033">
+
+
+
+
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD>
+ <DIV ALIGN="center"><IMG SRC="cheetah-face-black-medium.jpg"
+ ALT=""><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT=""><IMG SRC="banner_text.gif"
+ ALT="Cheetah: The Python-Powered Template Engine"></DIV>
+
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 bgcolor="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 bgcolor="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900>
+
+ <TABLE WIDTH=100% BGCOLOR="#3366CC" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+
+ <DIV ALIGN="center" CLASS="navBarContainer">
+ <A CLASS="navBar" HREF="index.html">Home</A><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">|<IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
+ <A CLASS="navBar" HREF="learn.html">Learn</A><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">|<IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
+ <A CLASS="navBar" HREF="download.html">Download</A><IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">|<IMG SRC="spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
+ <A CLASS="navBar" HREF="contribute.html">Contribute</A>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+
+ </TD>
+ <TD WIDTH="1" bgcolor="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=100 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+
+
+<TABLE ALIGN=center VALIGN="top" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=1 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+
+ <TD BGCOLOR="white">
+
+ <TABLE WIDTH=100% BGCOLOR="#EBEBEB" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+ <DIV CLASS="locationBarContainer">
+ <A CLASS="locationBar" HREF="index.html">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="learn.html">Learn</A>
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD HEIGHT=1 BGCOLOR="#CCCCCC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+ </TABLE>
+
+
+
+
+
+ <IMG SRC="spacer.gif" WIDTH=1 HEIGHT=25 ALT="">
+
+ <TABLE VALIGN="top" WIDTH=100% BORDER=0 CELLPADDING=10 CELLSPACING=0>
+ <TR>
+ <TD VALIGN="top">
+ <BR>
+ <A HREF="Downloads/users_guide.pdf"><B>PDF</B></A><BR>
+ <A HREF="Downloads/users_guide.ps"><B>PostScript</B></A><BR>
+ <A HREF="Downloads/users_guide.txt"><B>Plain Text</B></A><BR>
+
+ </TD>
+ <TD VALIGN="top">
+
+<div class="titlepage">
+<center>
+<h1>Cheetah Users Guide</h1>
+<p><b><font size='+2'>The Cheetah Development Team</font></b></p>
+<p><span class="email">cheetahtemplate-devel@lists.sourceforge.net</span></p>
+<p>
+</center>
+</div>
+
+<P>
+<BR>
+<BR><H2><A NAME="SECTION000100000000000000000">
+Contents</A>
+</H2>
+<!--Table of Contents-->
+
+<UL CLASS="TofC">
+<LI><A NAME="tex2html2"
+ HREF="users_guide.html">1 Introduction</A>
+<UL>
+<LI><A NAME="tex2html3"
+ HREF="#SECTION000210000000000000000">1.1 What is Cheetah?</A>
+<LI><A NAME="tex2html4"
+ HREF="#SECTION000220000000000000000">1.2 Why is it called Cheetah?</A>
+<LI><A NAME="tex2html5"
+ HREF="#SECTION000230000000000000000">1.3 Who developed Cheetah?</A>
+<LI><A NAME="tex2html6"
+ HREF="#SECTION000240000000000000000">1.4 How mature is Cheetah?</A>
+<LI><A NAME="tex2html7"
+ HREF="#SECTION000250000000000000000">1.5 Where can I get releases?</A>
+<LI><A NAME="tex2html8"
+ HREF="#SECTION000260000000000000000">1.6 Where can I get news?</A>
+<LI><A NAME="tex2html9"
+ HREF="#SECTION000270000000000000000">1.7 How can I contribute?</A>
+<LI><A NAME="tex2html10"
+ HREF="#SECTION000280000000000000000">1.8 Acknowledgements</A>
+<LI><A NAME="tex2html11"
+ HREF="#SECTION000290000000000000000">1.9 License</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html12"
+ HREF="#SECTION000300000000000000000">2 Getting Started</A>
+<UL>
+<LI><A NAME="tex2html13"
+ HREF="#SECTION000310000000000000000">2.1 Requirements</A>
+<LI><A NAME="tex2html14"
+ HREF="#SECTION000320000000000000000">2.2 Installation</A>
+<LI><A NAME="tex2html15"
+ HREF="#SECTION000330000000000000000">2.3 Testing your installation</A>
+<LI><A NAME="tex2html16"
+ HREF="#SECTION000340000000000000000">2.4 Quickstart tutorial</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html17"
+ HREF="#SECTION000400000000000000000">3 Template Objects</A>
+<UL>
+<LI><A NAME="tex2html18"
+ HREF="#SECTION000410000000000000000">3.1 The Template class</A>
+<LI><A NAME="tex2html19"
+ HREF="#SECTION000420000000000000000">3.2 Constructing Template objects</A>
+<LI><A NAME="tex2html20"
+ HREF="#SECTION000430000000000000000">3.3 Using Template objects</A>
+<LI><A NAME="tex2html21"
+ HREF="#SECTION000440000000000000000">3.4 Modifying Template objects</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html22"
+ HREF="#SECTION000500000000000000000">4 The Template Definition Language</A>
+<UL>
+<LI><A NAME="tex2html23"
+ HREF="#SECTION000510000000000000000">4.1 Placeholder tags</A>
+<LI><A NAME="tex2html24"
+ HREF="#SECTION000520000000000000000">4.2 Directive tags</A>
+<LI><A NAME="tex2html25"
+ HREF="#SECTION000530000000000000000">4.3 Comment directives</A>
+<LI><A NAME="tex2html26"
+ HREF="#SECTION000540000000000000000">4.4 #raw directives</A>
+<LI><A NAME="tex2html27"
+ HREF="#SECTION000550000000000000000">4.5 #include directives</A>
+<LI><A NAME="tex2html28"
+ HREF="#SECTION000560000000000000000">4.6 #cache directives</A>
+<LI><A NAME="tex2html29"
+ HREF="#SECTION000570000000000000000">4.7 Display logic directives</A>
+<LI><A NAME="tex2html30"
+ HREF="#SECTION000580000000000000000">4.8 #block directives</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html31"
+ HREF="#SECTION000600000000000000000">5 Macros</A>
+<UL>
+<LI><A NAME="tex2html32"
+ HREF="#SECTION000610000000000000000">5.1 What are macros?</A>
+<LI><A NAME="tex2html33"
+ HREF="#SECTION000620000000000000000">5.2 Using macros</A>
+<LI><A NAME="tex2html34"
+ HREF="#SECTION000630000000000000000">5.3 Defining macros</A>
+<LI><A NAME="tex2html35"
+ HREF="#SECTION000640000000000000000">5.4 Macro libraries</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html36"
+ HREF="#SECTION000700000000000000000">6 Using Cheetah with Webware</A>
+<UL>
+<LI><A NAME="tex2html37"
+ HREF="#SECTION000710000000000000000">6.1 Background</A>
+<LI><A NAME="tex2html38"
+ HREF="#SECTION000720000000000000000">6.2 Using the Inheritance approach</A>
+<LI><A NAME="tex2html39"
+ HREF="#SECTION000730000000000000000">6.3 Using the Containment approach</A>
+<LI><A NAME="tex2html40"
+ HREF="#SECTION000740000000000000000">6.4 User interaction in either approach</A>
+<LI><A NAME="tex2html41"
+ HREF="#SECTION000750000000000000000">6.5 Components</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html42"
+ HREF="#SECTION000800000000000000000">7 Customizing and extending Cheetah</A>
+<UL>
+<LI><A NAME="tex2html43"
+ HREF="#SECTION000810000000000000000">7.1 Custom handling of unknown placeholder names</A>
+<LI><A NAME="tex2html44"
+ HREF="#SECTION000820000000000000000">7.2 Plugins</A>
+<LI><A NAME="tex2html45"
+ HREF="#SECTION000830000000000000000">7.3 Custom variable-tags</A>
+<LI><A NAME="tex2html46"
+ HREF="#SECTION000840000000000000000">7.4 Custom directives</A>
+<LI><A NAME="tex2html47"
+ HREF="#SECTION000850000000000000000">7.5 Custom error handlers</A>
+<LI><A NAME="tex2html48"
+ HREF="#SECTION000860000000000000000">7.6 Safe delegation</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html49"
+ HREF="#SECTION000900000000000000000">8 Examples</A>
+<UL>
+<LI><A NAME="tex2html50"
+ HREF="#SECTION000910000000000000000">8.1 Syntax examples</A>
+<LI><A NAME="tex2html51"
+ HREF="#SECTION000920000000000000000">8.2 Webware Examples</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html52"
+ HREF="#SECTION0001000000000000000000">About this document ...</A>
+</UL>
+<!--End of Table of Contents-->
+<P>
+&#169;Copyright 2001, The Cheetah Development Team.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+
+<P>
+
+<H1><A NAME="SECTION000200000000000000000">&nbsp;</A>
+<BR>
+1 Introduction
+</H1>
+
+<P>
+
+<H2><A NAME="SECTION000210000000000000000">&nbsp;</A>
+<BR>
+1.1 What is Cheetah?
+</H2>
+
+<P>
+Cheetah is a Python-based template engine and code-generator. It aims:
+
+<P>
+
+<UL>
+<LI><B>to make it easy to separate content, graphic design, and program code.</B>
+
+<P>
+Program code should not pollute HTML and HTML should not pollute program
+ code. Nor should content pollute the structure of complex HTML designs and
+ vice versa.
+
+<P>
+There should be no need for a designer to work through a programmer to
+ change a website's design or to use dynamic components that have already
+ been coded. Likewise, content-providers should not have to work through a
+ 'webmaster' to add new content to a site. All members of the team should
+ be able to work independently and in parallel.
+
+<P>
+A clean separation makes it easier for a team of content-providers,
+ designers, and programmers to work together without stepping on each
+ other's toes and polluting each other's work. Other advantages include
+ faster development time; HTML and program code that are easier to
+ understand and maintain; content that can be displayed in a variety of
+ non-HTML formats such as PDF; and highly modular, flexible, and reusable
+ site architectures.
+
+<P>
+</LI>
+<LI><B>to make it easy to integrate content, graphic design, and program code.</B>
+
+<P>
+While it should be easy to develop content, graphic design, and program
+ code separately, it should NOT be difficult to integrate them as part of a
+ website. There should be no difficult hoops to jump through.
+
+<P>
+It should be easy:
+
+<UL>
+<LI>for programmers to create reusable components and functions that are
+ accessible and understandable to designers.
+</LI>
+<LI>for designers to mark out placeholders for content and dynamic components
+ in their templates.
+</LI>
+<LI>for designers to soft-code aspects of their design that are either
+ repeated in several places or are subject to change.
+</LI>
+<LI>for designers to extend and customize existing templates and thus minimize
+ duplication of effort and code.
+</LI>
+<LI>and, of course, for content-providers to use the templates that
+ designers have created.
+
+</LI>
+</UL>
+
+<P>
+</LI>
+<LI><B>to provide template designers with a small set of 'Display Logic'
+ programming structures such as conditional blocks and
+ for loops</B>
+
+<P>
+Graphic designers often do tasks that would be easier, faster, and less
+ error prone if they had access to <B>conditional blocks</B> and <B>for
+ loops</B>. However, a full programming language would be overkill for these
+ simple tasks and most designers don't have the time or desire to learn one.
+
+<P>
+</LI>
+<LI><B>to be equally well-suited for HTML, SGML, XML, SQL, Postscript, form
+ email, LaTeX, or any other text-based format.</B>
+
+<P>
+Although it was designed with dynamic websites and web applications in mind,
+ Cheetah is not HTML-specific.
+
+<P>
+</LI>
+<LI><B>to achieve all these aims in a manner that is efficient, flexible, and
+ extendable.</B>
+
+<P>
+</LI>
+</UL>
+
+<P>
+Cheetah achieves these aims by:
+
+<P>
+
+<UL>
+<LI>blending the power and flexibility of Python with the simplicity of a
+ small Template Definition language that non-programmers can understand.
+
+<P>
+</LI>
+<LI>giving template designers a simple way of accessing Python variables,
+ objects, and functions in their templates.
+
+<P>
+</LI>
+<LI>providing a modular, object-orientated framework that makes it easy to
+ create and maintain large websites.
+
+<P>
+</LI>
+<LI>compiling 'Template Definitions' into native Python code at startup.
+ Thereafter this code is executed for each request. This approach is
+ dramatically faster than the string substitution approach used by many
+ templating engines.
+
+<P>
+</LI>
+<LI>providing a very simple, yet powerful, caching mechanism that can
+ significantly increase the responsiveness of a dynamic website.
+
+<P>
+</LI>
+</UL>
+
+<P>
+
+<H2><A NAME="SECTION000220000000000000000">&nbsp;</A>
+<BR>
+1.2 Why is it called Cheetah?
+</H2>
+
+<P>
+Cheetah is fast, flexible, agile and graceful - like its namesake.
+
+<P>
+
+<H2><A NAME="SECTION000230000000000000000">&nbsp;</A>
+<BR>
+1.3 Who developed Cheetah?
+</H2>
+
+<P>
+Cheetah is one of several templating frameworks that grew out of a 'templates'
+thread on the 'Webware For Python' email list. Tavis Rudd, Mike Orr, Chuck
+Esterbrook, Ian Bicking and Tom Schwaller are the core developers.
+
+<P>
+
+<H2><A NAME="SECTION000240000000000000000">&nbsp;</A>
+<BR>
+1.4 How mature is Cheetah?
+</H2>
+
+<P>
+Cheetah is alpha/beta software as this User's Guide is incomplete and several aspects
+of the design are still subject to change. However, it has been tested
+extensively and has few known issues. We are hoping to release production
+version 1.0 in the summer of 2001.
+
+<P>
+Here's a summary of known issues and aspects of the design that are in flux.
+
+<UL>
+<LI>The #include directive is not working with relative path file includes
+ when used with Webware. This should be resolved soon.
+</LI>
+<LI>The #include directive might be reworked to monitor for changes in the
+ included file at run-time. It currently does the include once-off at
+ compile-time.
+</LI>
+<LI>The implementation of $placeholders(WithArgstrings) needs to be fleshed
+ out to handle nesting.
+</LI>
+</UL>
+
+<P>
+
+<H2><A NAME="SECTION000250000000000000000">&nbsp;</A>
+<BR>
+1.5 Where can I get releases?
+</H2>
+
+<P>
+Cheetah releases can be downloaded from
+<a class="url" href="http://CheetahTemplate.sourceforge.net">http://CheetahTemplate.sourceforge.net</a>
+<P>
+
+<H2><A NAME="SECTION000260000000000000000">&nbsp;</A>
+<BR>
+1.6 Where can I get news?
+</H2>
+
+<P>
+News and updates can be obtained from the the Cheetah website:
+<a class="url" href="http://CheetahTemplate.sourceforge.net">http://CheetahTemplate.sourceforge.net</a>
+<P>
+Cheetah discussions take place on the list
+<span class="email">cheetahtemplate-discuss@lists.sourceforge.net</span>.
+
+<P>
+If you encounter difficulties, or are unsure about how to do something,
+please post a detailed message to the list.
+
+<P>
+
+<H2><A NAME="SECTION000270000000000000000">&nbsp;</A>
+<BR>
+1.7 How can I contribute?
+</H2>
+
+<P>
+Cheetah is the work of many volunteers. If you use Cheetah please share your
+experiences, tricks, customizations, and frustrations.
+
+<P>
+
+<H3><A NAME="SECTION000271000000000000000">
+1.7.1 Bug reports and patches</A>
+</H3>
+
+<P>
+If you think there is a bug in Cheetah, send a message to the email list
+with the following information:
+
+<P>
+
+<OL>
+<LI>a description of what you were trying to do and what happened
+</LI>
+<LI>all tracebacks and error output
+</LI>
+<LI>your version of Cheetah
+</LI>
+<LI>your version of Python
+</LI>
+<LI>your operating system
+</LI>
+<LI>whether you have changed anything in the Cheetah installation
+</LI>
+</OL>
+
+<P>
+
+<H3><A NAME="SECTION000272000000000000000">
+1.7.2 Example sites and tutorials</A>
+</H3>
+If you're developing a website with Cheetah, please send a link to the
+email list so we can keep track of Cheetah sites. Also, if you discover
+new and interesting ways to use Cheetah please share your experience and
+write a quick tutorial about your technique.
+
+<P>
+
+<H3><A NAME="SECTION000273000000000000000">
+1.7.3 Macro libraries</A>
+</H3>
+We hope to build up a framework of macros libraries (see section
+<A HREF="users_guide.html#macros.libraries">5.4</A>) to distribute with Cheetah and would appreciate
+any contributions.
+
+<P>
+
+<H3><A NAME="SECTION000274000000000000000">
+1.7.4 Test cases</A>
+</H3>
+Cheetah is packaged with a regression testing suite that is run with each
+new release to ensure that everything is working as expected and that recent
+changes haven't broken anything. The test cases are in the Cheetah.Tests
+module. If you find a reproduceable bug please consider writing a test case
+that will pass only when the bug is fixed. Send any new test cases to the email
+list with the subject-line ``new test case for Cheetah.''
+
+<P>
+
+<H3><A NAME="SECTION000275000000000000000">
+1.7.5 Publicity</A>
+</H3>
+Help spread the word ... recommend it to others, write articles about it, etc.
+
+<P>
+
+<H2><A NAME="SECTION000280000000000000000">&nbsp;</A>
+<BR>
+1.8 Acknowledgements
+</H2>
+
+<P>
+We'd like to thank the following people for contributing valuable advice, code
+and encouragement: Geoff Talvola, Jay Love, Terrel Shumway, Sasa Zivkov, Arkaitz
+Bitorika, Jeremiah Bellomy, Baruch Even, Paul Boddie, Stephan Diehl, and Geir
+Magnusson.
+
+<P>
+The Velocity, WebMacro and Smarty projects provided inspiration and design
+ideas. Cheetah has benefited from the creativity and energy of their
+developers. Thank you.
+
+<P>
+
+<H2><A NAME="SECTION000290000000000000000">&nbsp;</A>
+<BR>
+1.9 License
+</H2>
+
+<P>
+Cheetah is released for unlimited distribution under the terms of the
+Python license.
+
+<H1><A NAME="SECTION000300000000000000000">&nbsp;</A>
+<BR>
+2 Getting Started
+</H1>
+
+<P>
+
+<H2><A NAME="SECTION000310000000000000000">
+2.1 Requirements</A>
+</H2>
+Cheetah requires Python release 2.0 or greater and should run on any
+operating system that Python 2.0 runs on.
+
+<P>
+
+<H2><A NAME="SECTION000320000000000000000">
+2.2 Installation</A>
+</H2>
+
+<P>
+To install Cheetah for a single user:
+
+<OL>
+<LI>copy the 'Cheetah' sub-directory to a location that is in the user's
+ PYTHON_PATH
+</LI>
+</OL>
+
+<P>
+To install Cheetah for system-wide use:
+
+<OL>
+<LI>on POSIX systems (AIX, Solaris, Linux, IRIX, etc.) become the 'root' user
+ and run: python ./setup.py install
+
+<P>
+</LI>
+<LI>On non-POSIX systems, such as Windows NT, login as an administrator and
+ type this at the command-line: python setup.py install
+</LI>
+</OL>
+
+<P>
+On POSIX systems, the system-wide installation will also install the Cheetah's
+command-line compiler program, TScompile, to a system-wide executable path such as
+/usr/local/bin.
+
+<P>
+
+<H2><A NAME="SECTION000330000000000000000">
+2.3 Testing your installation</A>
+</H2>
+You can run the test suite to insure that your installation is correct by
+following these steps:
+
+<OL>
+<LI>CD into the directory ./Cheetah
+</LI>
+<LI>type: <code>python Tests.py</code>
+</LI>
+</OL>
+
+<P>
+If any of the tests fail please send a message to the email list with a copy of
+the test output and the following details about your installation:
+
+<P>
+
+<OL>
+<LI>your version of Cheetah
+</LI>
+<LI>your version of Python
+</LI>
+<LI>your operating system
+</LI>
+<LI>whether you have changed anything in the Cheetah installation
+</LI>
+</OL>
+
+<P>
+
+<H2><A NAME="SECTION000340000000000000000">
+2.4 Quickstart tutorial</A>
+</H2>
+This tutorial briefly introduces the basic usage of Cheetah. See the
+following chapters for more detailed explanations.
+
+<P>
+<B>This tutorial will be fleshed out further at later date.</B>
+
+<P>
+The core of Cheetah is the <code>Template</code> class in the <code>Cheetah.Template</code>
+module. The following example shows how to use the <code>Template</code> class from an
+interactive Python session. Lines prefixed with <code>&#187;&gt;</code> and <code>...</code> are
+user input. The remaining lines are Python output.
+
+<P>
+<dl><dd><pre class="verbatim">
+&gt;&gt;&gt; from Cheetah.Template import Template
+&gt;&gt;&gt; templateDef = """
+... &lt;HTML&gt;
+... &lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+... &lt;BODY&gt;
+... $contents
+... &lt;/BODY&gt;
+... &lt;/HTML&gt;"""
+&gt;&gt;&gt; nameSpace = {'title': 'Hello World Example', 'contents': 'Hello World!'}
+&gt;&gt;&gt; templateObj = Template(templateDef, nameSpace)
+&gt;&gt;&gt; print templateObj
+
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;Hello World Example&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+Hello World!
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+&gt;&gt;&gt; print templateObj # templateObj can be printed as many times as you need
+
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;Hello World Example&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+Hello World!
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+
+<H1><A NAME="SECTION000400000000000000000">&nbsp;</A>
+<BR>
+3 Template Objects
+</H1>
+
+<P>
+
+<H2><A NAME="SECTION000410000000000000000">
+3.1 The Template class</A>
+</H2>
+The Template class is the heart of Cheetah. It parses and compiles
+Template Definitions into python code and serves the filled template output to
+any client that requests it.
+
+<P>
+
+<H2><A NAME="SECTION000420000000000000000">
+3.2 Constructing Template objects</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000430000000000000000">
+3.3 Using Template objects</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000440000000000000000">
+3.4 Modifying Template objects</A>
+</H2>
+
+<P>
+
+<H1><A NAME="SECTION000500000000000000000">
+4 The Template Definition Language</A>
+</H1>
+
+<P>
+<B>Template definitions</B> are text strings, or files, that have been marked up
+with Cheetah tags for special processing. Cheetah has 2 types of tags:
+
+<P>
+
+<OL>
+<LI><B>placeholders</B>: for marking areas of the template that should be
+ replaced with something.
+
+<P>
+Placeholders begin with a dollar sign (<code>$varName</code>).
+
+<P>
+</LI>
+<LI><B>directives</B>: for everything else:
+
+ <OL>
+<LI><B>raw text</B> for marking verbatim blocks should not be parsed for
+ Cheetah tags.
+</LI>
+<LI><B>comments</B> that should not appear in the output
+</LI>
+<LI><B>includes</B> to include external text. The text can be included
+ verbatim or with parsing for Cheetah tags.
+</LI>
+<LI><B>display logic</B> such as <B>conditional blocks</B> (if-blocks) and
+ <B>for loops</B>
+</LI>
+<LI><B>blocks</B>, which are named sections of a template that can be
+ redefined (overridden) in a subclass or by template users
+</LI>
+<LI>etc.
+
+</LI>
+</OL>
+<P>
+Directives begin with a hash character (#).
+
+<P>
+</LI>
+</OL>
+
+<P>
+
+<H2><A NAME="SECTION000510000000000000000">
+4.1 Placeholder tags</A>
+</H2>
+Cheetah uses placeholder tags in the form <code>$varName</code> to mark out
+areas of the template definition that should be replaced with something. Placeholders are
+equivalent to <B>fields</B> on a form. Placeholders can be replaced with plain
+content or variables, objects and function output from Python.
+
+<P>
+The example below demonstrates the use of placeholders in an HTML document.
+
+<P>
+<dl><dd><pre class="verbatim">
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+$contents
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+When this template is filled in, the placeholders <code>$title</code> and
+<code>$content</code> will be replaced with the values of the variables <code>title</code>
+and <code>content</code>.
+
+<P>
+
+<H3><A NAME="SECTION000511000000000000000">
+4.1.1 Rules for placeholder names</A>
+</H3>
+
+<UL>
+<LI>Cheetah ignores all dollar signs (<code>$</code>) that are not followed
+ by a letter or an underscore. As a corollary, dollar amounts
+ (<code>$2.50</code>)are not placeholders but are instead output literally as
+ they should be. Cheetah also ignores any placeholder escaped by a
+ backslash (<code><SPAN CLASS="MATH"><IMG
+ WIDTH="12" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img1.gif"
+ ALT="$ackslash$"></SPAN>$placeholderName</code>).
+
+<P>
+</LI>
+<LI>The first character of a placeholder name must be either an underscore or
+ a letter. Valid characters for the rest of the name are underscores,
+ letters, numbers and periods. These names are valid: <code>$a</code>,
+ <code>$_</code>, <code>$var</code>, <code>$_var</code>, <code>$var1</code>, <code>$_1var</code>,
+ <code>$var2_</code>, <code>$dict.key</code>, <code>$list.item</code>,
+ <code>$object.method</code>. These names are not: <code>$1</code>, <code>$var@2</code>,
+ <code>$var</code>.
+
+<P>
+</LI>
+<LI>names are case-sensitive. <code>$var</code> does not equal <code>$Var</code>
+ or <code>$vAr</code> or <code>$VAR</code>.
+
+<P>
+</LI>
+<LI>Trailing periods are ignored. Cheetah will recognize that
+ placeholder name in <code>$varName.</code> is <code>varName</code> and the period will
+ be left alone in the filled template output.
+
+<P>
+</LI>
+<LI>Placeholders can also be written in the form <code>${placeholderName}</code>.
+ This is useful for cases where there is no whitespace between the
+ placeholder and surrounding text (<code>surrounding${embeddedVar}text</code>).
+</LI>
+</UL>
+
+<P>
+
+<H3><A NAME="SECTION000512000000000000000">
+4.1.2 The searchList</A>
+</H3>
+A <B>namespace</B> is a Python dictionary that links names to values. Each
+template definition that has been loaded into a <code>Template</code> objet is
+associated with an ordered list of namespaces in which values for placeholder
+variable names can be stored. This list is called the <B>searchList</B>.
+
+<P>
+The searchList can contain one or more namespaces. In most cases only one
+namespace will be in the searchList unless you explicitly load extra ones. When
+Cheetah fills in <code>$content</code> in previous example it searchs
+sequentially through the searchList until it finds a value for <code>$content</code>.
+Thus, if three namespaces are loaded and two of them contain a value for
+<code>$content</code>, the value for <code>content</code> from the namespace that is
+closest to the start of the searchList will be returned.
+
+<P>
+If you add a Python object to the searchList, its attributes and methods will be
+accessible as placeholder names. For example, <code>myObject</code> contains
+<code>myAttrib</code> and <code>myMethod</code>. If <code>myObject</code> is added to the
+searchList, <code>$myAttrib</code> and <code>$myMethod</code> can be used as placeholder
+names.
+
+<P>
+The default namespace in every searchList is the <code>Template</code> object itself.
+This means that any attributes or methods that are added to classes that inherit
+from <code>Template</code> can be accessed in templates via <code>$placeholders</code>. New
+namespaces can be added to the searchList at any time using the
+<code>Template.addToSearchList()</code> method. See section <A HREF="users_guide.html#webware">6</A> for more
+information on how to use namespaces and the searchList.
+
+<P>
+
+<H3><A NAME="SECTION000513000000000000000">
+4.1.3 Placeholder values</A>
+</H3>
+
+<P>
+Placeholder names can map to Python text strings, numbers, dictionaries, lists
+(arrays), functions, objects, or even nested Cheetah templates. If the value is
+not a String, Cheetah will call <code>str()</code> on it to obtain a string
+representation that can be inserted into the template. But if the value is a
+callable object (e.g., a function or a method), Cheetah will first call it and
+then call <code>str()</code> on the result. You may include or omit the () after
+callable placeholders: Cheetah will call it (without arguments) in either case.
+
+<P>
+<dl><dd><pre class="verbatim">
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+
+$aString ## these names are chosen to indicate what
+$aNumber ## type of value they map to. They could be
+$aList ## any valid placeholder name.
+$aDictionary
+$aFunction
+$anObject
+
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+Note that you don't need to include () after <code>$aFunction</code>. Cheetah
+will recognize callable variables like functions and methods, call them and
+interpolate their return value in the filled template output.
+
+<P>
+You cannot pass arguments to a function or method called this way. (Actually,
+you can, but this feature may be removed soon, because it introduces too much
+complexity that is better done in Python outside the template.) The function or
+method must either accept no arguments, or all its arguments must have default
+values. Macro calls (see the Macros section) can accept arguments, but we
+aren't talking about macros here.
+
+<P>
+Templates can be nested. It is valid to embed a placeholder name that maps to
+another <code>Template</code> object. The filled output of the nested template will be
+interpolated into the top-level template's output. There is no limit on the
+depth of template nesting.
+
+<P>
+
+<H3><A NAME="SECTION000514000000000000000">
+4.1.4 Placeholders with no value defined</A>
+</H3>
+If there is no value defined in the searchList for a placeholder name,
+Cheetah will search for an leading underscore version of the name. For
+example, if it can't find <code>$varName</code> it will attempt to find
+<code>$_varName</code>. If that fails, Cheetah will include the placeholder
+tag verbatim in the filled template output.
+
+<P>
+This behaviour can be customized and a default value can be set for names
+that are not found. See section <A HREF="users_guide.html#customizing">7</A> for more details.
+
+<P>
+
+<H3><A NAME="SECTION000515000000000000000">
+4.1.5 Dotted notation</A>
+</H3>
+Placeholder names can also use <B>dotted notation</B> to access entries in
+dictionaries, items in lists, and the attributes and methods of objects.
+Cheetah uses a consistent dotted notation syntax to access the contents
+of all types of containers. This is unlike Python, C++, Java, and other
+languages where dotted notation can only be used to access the attributes and
+methods of objects. <A NAME="tex2html1"
+ HREF="#foot343"><SUP>1</SUP></A>
+<P>
+<dl><dd><pre class="verbatim">
+$aDictionary.keyName ## must be a valid key of the dictionary
+$aList.3 ## must be a valid index (0-based like in Python)
+$anObject.attributeName ## must be a valid attribute name
+$anObject.method ## must be a valid method name,
+ ## leave off the parentheses on method()
+</pre></dl>
+
+<P>
+Dotted notation can be used on nested containers of any depth.
+<dl><dd><pre class="verbatim">
+$dict1.dict2.dict3.keyName ## nested dictionaries
+$anObject.nestedDict.keyName ## if the object contains a dictionary
+</pre></dl>
+
+<P>
+
+<H3><A NAME="SECTION000516000000000000000">
+4.1.6 Caching</A>
+</H3>
+
+<P>
+By default the value of each <code>$placeholder</code> is updated for each request.
+If you want to statically cache the value of the <code>$placeholder</code> upon
+startup, add an asterisk after the $ sign. <code>$var</code> becomes <code>$*var</code>.
+See the section on the <code>#cache</code> directive below for more information.
+
+<P>
+If you only need to update the value of the <code>$placeholders</code> at specific time intervals use
+this form: <code>$variable</code> becomes <code>$*15*variable</code> , where 15 is the time interval in
+minutes. The time interval can also be specified in fractions of a minute such
+as <code>$*0.5*variable</code>.
+
+<P>
+<dl><dd><pre class="verbatim">
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+
+$var ## dynamic - will be reinterpolated for each request
+$*var2 ## static - will be interpolated only once at start-up
+$*5*var3 ## timed refresh - will be updated every 5 minutes.
+
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+
+<H2><A NAME="SECTION000520000000000000000">
+4.2 Directive tags</A>
+</H2>
+Directives tags are used for all functionality that cannot be handled with
+simple placeholders and are enclosed in <code>#</code> and <code>/#</code>.
+Cheetah does not use HTML/XML style tags because they would be hard to
+distinguish from real HTML tags and would not be visible in rendered HTML when
+something goes wrong.
+
+<P>
+Some directives consist of a single tag while others have <B>start</B> and
+<B>end</B> tags that surround a chunk of text. End tags are written in the form
+<code>#end nameOfTheDirective/#</code>.
+
+<P>
+
+<H3><A NAME="SECTION000521000000000000000">
+4.2.1 Escaping directives</A>
+</H3>
+Directives can be escaped by placing a backslash (<SPAN CLASS="MATH"><IMG
+ WIDTH="12" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
+ SRC="img1.gif"
+ ALT="$ackslash$"></SPAN>) before them.
+Escaped directives will be printed verbatim.
+
+<P>
+
+<H3><A NAME="SECTION000522000000000000000">
+4.2.2 Tag closures: explicit and implicit</A>
+</H3>
+Directive tags can closed explicitly with <code>/#</code> or implicitly with the end
+of the line if you're feeling lazy.
+<dl><dd><pre class="verbatim">
+#block /#
+Text in the contents area of the
+block directive
+#end block /#
+</pre></dl>
+or
+<dl><dd><pre class="verbatim">
+#block
+Text in the contents area of the
+block directive
+#end block
+</pre></dl>
+
+<P>
+
+<H3><A NAME="SECTION000523000000000000000">
+4.2.3 Whitespace handling</A>
+</H3>
+
+<P>
+
+<H2><A NAME="SECTION000530000000000000000">
+4.3 Comment directives</A>
+</H2>
+
+<P>
+Comment directives are used to mark notes, explanations, and decorative text
+that should not appear in the output. There are two forms of the comment
+directive: single-line and multi-line.
+
+<P>
+All text in a template definition that lies between 2 hash characters
+(<code>##</code>) and the end of the line is treated as a single-line comment and
+will not show up in the output, unless the 2 hash characters are escaped with a
+backslash.
+<dl><dd><pre class="verbatim">
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+##==================================== a decorative comment
+$contents ## an end-of-line comment
+##====================================
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+Any text between <code>#*</code> and <code>*#</code> will be treated as a multi-line
+comment.
+<dl><dd><pre class="verbatim">
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+#*
+ Here is some multiline
+ comment text
+*#
+##==================================== a decorative comment
+$contents ## an end-of-line comment
+##====================================
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+
+<H2><A NAME="SECTION000540000000000000000">
+4.4 #raw directives</A>
+</H2>
+Any section of a template definition that is delimeted by <code>#raw</code> and
+<code>#end raw</code> will be printed verbatim without any parsing of
+$placeholders or other directives. This can be very useful for debugging or
+writing Cheetah examples and tutorials.
+
+<P>
+
+<H2><A NAME="SECTION000550000000000000000">
+4.5 #include directives</A>
+</H2>
+
+<P>
+<code>#include</code> directives are used to include text from outside the template
+definition. The text can come from <code>$placeholder</code> variables or from
+external files. The example below demonstrates use with <code>$placeholder</code>
+variables.
+
+<P>
+<dl><dd><pre class="verbatim">
+#include $myParseText
+</pre></dl>
+
+<P>
+This example demonstrates its use with external files.
+<dl><dd><pre class="verbatim">
+#include "includeFileName.txt"
+</pre></dl>
+
+<P>
+By default, included text will be parsed for Cheetah tags. The keyword
+<B>raw</B> can be used to mark the text for verbatim inclusion without any tag
+parsing.
+
+<P>
+<dl><dd><pre class="verbatim">
+#include raw $myParseText
+#include raw "includeFileName.txt"
+</pre></dl>
+
+<P>
+<code>Template</code> uses its .getFileContents(fileName) method to locate the file to
+be included. This method can be overriden in subclasses if you want to modify
+or extend its behaviour. It is possible to implement the logic for getting
+remote files such as <code>http://myserver.com/file.txt</code>.
+
+<P>
+
+<H2><A NAME="SECTION000560000000000000000">
+4.6 #cache directives</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000570000000000000000">
+4.7 Display logic directives</A>
+</H2>
+
+<P>
+
+<H3><A NAME="SECTION000571000000000000000">
+4.7.1 Conditional blocks</A>
+</H3>
+
+<P>
+
+<H3><A NAME="SECTION000572000000000000000">
+4.7.2 For loops</A>
+</H3>
+
+<P>
+
+<H2><A NAME="SECTION000580000000000000000">
+4.8 #block directives</A>
+</H2>
+
+<P>
+
+<H3><A NAME="SECTION000581000000000000000">
+4.8.1 #redefine directives</A>
+</H3>
+
+<P>
+
+<H1><A NAME="SECTION000600000000000000000">&nbsp;</A>
+<BR>
+5 Macros
+</H1>
+
+<P>
+
+<H2><A NAME="SECTION000610000000000000000">&nbsp;</A>
+<BR>
+5.1 What are macros?
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000620000000000000000">&nbsp;</A>
+<BR>
+5.2 Using macros
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000630000000000000000">&nbsp;</A>
+<BR>
+5.3 Defining macros
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000640000000000000000">&nbsp;</A>
+<BR>
+5.4 Macro libraries
+</H2>
+
+<H1><A NAME="SECTION000700000000000000000">&nbsp;</A>
+<BR>
+6 Using Cheetah with Webware
+</H1>
+
+<P>
+
+<H2><A NAME="SECTION000710000000000000000">
+6.1 Background</A>
+</H2>
+Webware is a 'Python-Powered Internet Platform' that uses servlets in a manner
+similar to Java servlets. 'WebKit' is the name of Webware's application server.
+For more details please visit http://webware.sourceforge.net.
+
+<P>
+As Cheetah's core is flexible there are many ways to use it with Webware
+servlets. There are two broad categories: the Inheritance approach and
+the Containment approach. In the Inheritance approach a servlet is created that
+subclasses both the Template class and Webware's HTTPServlet class. The
+Template instance IS the servlet and its .respond() method is
+automatically called by WebKit for each request. All pre-request processing is
+handled via Cheetah.
+
+<P>
+In the Containment approach an instance of the Template class is wrapped
+up inside of a Webware servlet class. Instances of the servlet class must
+explicitly call the Template instance's .respond(), or .__str__(), method
+for each request. In this case the servlet class can handle whatever
+per-request processing needs to be done before it calls Cheetah.respond().
+
+<P>
+The Inheritance approach is the simplest and is best suited for building sites
+from scratch.
+
+<P>
+The Containment approach is slightly more complex and is best suited for use
+with existing Webware servlets. It is also ideal for cases where you wish to
+use Cheetah for only a portion of the servlet's output, such as a
+discussion-forum table at the bottom of a webpage.
+
+<P>
+
+<H2><A NAME="SECTION000720000000000000000">
+6.2 Using the Inheritance approach</A>
+</H2>
+Cheetah.Servlet provides a servlet class that can be subclassed to create
+Webware servlets, as in the trivial example below.
+
+<P>
+<dl><dd><pre class="verbatim">
+## FILE: hello_world.py ##
+template = """
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;'Hello World - Test Servlet&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+Hello World!
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+"""
+from Cheetah.Servlet import TemplateServlet
+class hello_world(TemplateServlet):
+ def __init__(self):
+ TemplateServlet.__init__(self, template)
+</pre></dl>
+
+<P>
+TemplateServlet's constructor method (<code>TemplateServlet.__init__()</code>) adds
+the attribute dictionary of the servlet to the searchList that
+<code>$placeholder</code> variables can extracted from. Thus, attributes and methods
+of the servlet object can be interpolated into the template like this:
+
+<P>
+<dl><dd><pre class="verbatim">
+## FILE: hello_world.py ##
+template = """
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+$contents
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+"""
+from Cheetah.Servlet import TemplateServlet
+class hello_world(TemplateServlet):
+ title = 'Hello World - Test Servlet'
+ def __init__(self):
+ TemplateServlet.__init__(self, template)
+
+ def contents(self):
+ return 'Hello World!'
+</pre></dl>
+
+<P>
+This process can be simplified for non-programmers. All the Python wrapper code
+in these examples can be generated automatically by <code>cheetah-compile</code>, a small program
+that is installed with Cheetah. <code>cheetah-compile</code> parses Template Definitions
+written in files with the .tmpl extension and generates a Webware servlet file
+with the .py extension for each .tmpl file. Type <code>cheetah-compile</code> after
+installing Cheetah to get information on how to use it.
+
+<P>
+Here's the first example as a .tmpl file:
+
+<P>
+<dl><dd><pre class="verbatim">
+## FILE: hello_world.tmpl ##
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;Hello World - Test Servlet&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+Hello World!
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+Here's the second example as a .tmpl file. Note that all lines that begin with
+<code>##</code> are comment lines.
+
+<P>
+<dl><dd><pre class="verbatim">
+## FILE: hello_world.tmpl ##
+##===================================
+#data
+title = 'Hello World - Test Servlet'
+def contents():
+ return 'Hello World!'
+#/data
+##===================================
+&lt;HTML&gt;
+&lt;HEAD&gt;&lt;TITLE&gt;$title&lt;/TITLE&gt;&lt;/HEAD&gt;
+&lt;BODY&gt;
+$contents
+&lt;/BODY&gt;
+&lt;/HTML&gt;
+</pre></dl>
+
+<P>
+
+<H3><A NAME="SECTION000721000000000000000">
+6.2.1 The #data directive</A>
+</H3>
+The previous example introduced the <code>#data</code> directive, a shortcut means
+of adding data into the servlet's attribute dictionary and thus into
+the Template's <B>searchList</B>. The <code>#data</code> directive can be used in
+any Template Definition, regardless of whether the definition is in a .py or
+.tmpl file.
+
+<P>
+<code>#data</code> directives can contain any valid Python code
+
+<P>
+
+<H3><A NAME="SECTION000722000000000000000">
+6.2.2 The SkeletonPage framework</A>
+</H3>
+
+<P>
+
+<H3><A NAME="SECTION000723000000000000000">
+6.2.3 PlateKit</A>
+</H3>
+Forget what you knew about PlateKit. It's undergoing some changes and is out of
+action for the time-being.
+
+<P>
+
+<H2><A NAME="SECTION000730000000000000000">
+6.3 Using the Containment approach</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000740000000000000000">
+6.4 User interaction in either approach</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000750000000000000000">
+6.5 Components</A>
+</H2>
+
+<P>
+
+<H3><A NAME="SECTION000751000000000000000">
+6.5.1 What are components?</A>
+</H3>
+
+<P>
+
+<H3><A NAME="SECTION000752000000000000000">
+6.5.2 Using components</A>
+</H3>
+
+<P>
+
+<H3><A NAME="SECTION000753000000000000000">
+6.5.3 Building components</A>
+</H3>
+
+<P>
+
+<H1><A NAME="SECTION000800000000000000000">&nbsp;</A>
+<BR>
+7 Customizing and extending Cheetah
+</H1>
+
+<P>
+
+<H2><A NAME="SECTION000810000000000000000">
+7.1 Custom handling of unknown placeholder names</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000820000000000000000">
+7.2 Plugins</A>
+</H2>
+
+<H3><A NAME="SECTION000821000000000000000">
+7.2.1 The PSP plugin</A>
+</H3>
+
+<P>
+
+<H2><A NAME="SECTION000830000000000000000">
+7.3 Custom variable-tags</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000840000000000000000">
+7.4 Custom directives</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000850000000000000000">
+7.5 Custom error handlers</A>
+</H2>
+
+<P>
+
+<H2><A NAME="SECTION000860000000000000000">
+7.6 Safe delegation</A>
+</H2>
+Safe Delegation, as provided by Zope and Allaire's Spectra, is not a core aim of
+Cheetah. However, several hooks were built into Cheetah so that Safe
+Delegation can be implemented at a later date.
+
+<P>
+
+<H1><A NAME="SECTION000900000000000000000">&nbsp;</A>
+<BR>
+8 Examples
+</H1>
+
+<P>
+The Cheetah distribution comes with an 'examples' directory. Browse the
+files in this directory and its subdirectories for examples of how
+Cheetah can be used.
+
+<P>
+
+<H2><A NAME="SECTION000910000000000000000">
+8.1 Syntax examples</A>
+</H2>
+Cheetah's <code>Tests</code> module contains a large number of test cases
+that can double as examples of how the Template Definition Language works.
+To view these cases go to the base directory of your Cheetah distribution
+and open the file Cheetah/Tests.py in a text editor.
+
+<P>
+
+<H2><A NAME="SECTION000920000000000000000">
+8.2 Webware Examples</A>
+</H2>
+The 'examples' directory has a subdirectory called 'webware_examples'. It
+contains example servlets that use Webware.
+
+<P>
+A subdirectory titled 'webwareSite' contains a complete website example. This
+site is my proposal for the new Webware website. The site demonstrates the
+advanced Cheetah features such as the <code>#data</code> and <code>#redefine</code>
+directives. It also demonstrates how the TScompile program can be used to
+generate Webware .py servlet files from .tmpl Template Definition files.
+
+<P>
+
+<H1><A NAME="SECTION0001000000000000000000">
+About this document ...</A>
+</H1>
+ <strong>Cheetah Users Guide</strong>
+<p> This document was generated using the <a
+ href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/">
+ <strong>LaTeX</strong>2<tt>HTML</tt></a> translator.
+</p>
+
+<p> <a
+ href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/">
+ <strong>LaTeX</strong>2<tt>HTML</tt></a> is Copyright &copy;
+ 1993, 1994, 1995, 1996, 1997, <a
+ href="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos
+ Drakos</a>, Computer Based Learning Unit, University of
+ Leeds, and Copyright &copy; 1997, 1998, <a
+ href="http://www.maths.mq.edu.au/~ross/">Ross
+ Moore</a>, Mathematics Department, Macquarie University,
+ Sydney.
+</p>
+
+<p> The application of <a
+ href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/">
+ <strong>LaTeX</strong>2<tt>HTML</tt></a> to the Python
+ documentation has been heavily tailored by Fred L. Drake,
+ Jr. Original navigation icons were contributed by Christopher
+ Petrilli.
+</p>
+<BR><HR><H4>Footnotes</H4>
+<DL>
+<DT><A NAME="foot343">... objects.</A><A NAME="foot343"
+ HREF="users_guide.html#tex2html1"><SUP>1</SUP></A>
+<DD>Cheetah uses a Python module called
+ NameMapper to handle this style of dotted notation. NameMapper is distributed
+ as part of the Cheetah package and can be used as a stand-alone tool.
+ NameMapper was inspired by Chuck Esterbrook's NamedValueAccess module
+
+ </TD>
+ </TR>
+ </TABLE>
+
+ <IMG SRC="spacer.gif" WIDTH=1 HEIGHT=200 ALT="">
+ </TD>
+
+ <TD WIDTH=1 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 BGCOLOR="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900 BGCOLOR="black"><IMG SRC="spacer.gif" WIDTH=100 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=8 bgcolor="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ <TD WIDTH=900 BGCOLOR="#3366CC"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=25 ALT=""></TD>
+ <TD WIDTH="1" BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=center BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90%>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 BGCOLOR="#6699FF"><IMG SRC="spacer.gif" WIDTH=1 HEIGHT=1 ALT=""></TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV CLASS="copyrightFooter">
+ Copyright &copy; 2001 The Cheetah Development Team. All rights reserved.
+ </DIV>
+ <BR>
+
+ <DIV CLASS="copyrightFooter" ALIGN="center">Hosted on<BR>
+ <a href=http://sourceforge.net><img
+ src=http://sourceforge.net/sflogo.php?group_id=28961&type=1"
+ alt="SourceForge Home" height=31 width=88 border=0></a>
+ </DIV>
+
+ </TD>
+ </TR>
+</TABLE>
+
+
+<BR>
+<BR>
+<BR>
+
+
+
+
+</BODY>
+</HTML>
diff --git a/examples/webware_examples/cheetahSite/learn.tmpl b/examples/webware_examples/cheetahSite/learn.tmpl
new file mode 100644
index 0000000..7ef7ff1
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/learn.tmpl
@@ -0,0 +1,43 @@
+#extend SiteTemplate
+
+##============================================================================##
+#data
+
+def usersGuideTxt():
+ USERS_GUIDE_PATH = '/home/tavis/Cheetah/docs/users_guide_html/index.html'
+ txt = open(USERS_GUIDE_PATH).read()
+ start = txt.find('<div class="titlepage">')
+ end = txt.find('</DL>\\n<DIV CLASS="navigation">') - 3
+ return txt[start:end]
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from SiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.html">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="learn.html">Learn</A>
+#end redefine locationBarContents
+##============================================================================##
+
+
+##============================================================================##
+## from SiteTemplate
+#redefine leftSideBar
+ <BR>
+ <A HREF="Downloads/users_guide.pdf"><B>PDF</B></A><BR>
+ <A HREF="Downloads/users_guide.ps"><B>PostScript</B></A><BR>
+ <A HREF="Downloads/users_guide.txt"><B>Plain Text</B></A><BR>
+#end redefine leftSideBar
+##============================================================================##
+
+##============================================================================##
+## from SiteTemplate
+#redefine mainContentsCell
+
+$*usersGuideTxt
+
+#end redefine mainContentsCell
+##============================================================================##
diff --git a/examples/webware_examples/cheetahSite/sourceforge_logo.gif b/examples/webware_examples/cheetahSite/sourceforge_logo.gif
new file mode 100644
index 0000000..08589d2
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/sourceforge_logo.gif
Binary files differ
diff --git a/examples/webware_examples/cheetahSite/spacer.gif b/examples/webware_examples/cheetahSite/spacer.gif
new file mode 100644
index 0000000..5bfd67a
--- /dev/null
+++ b/examples/webware_examples/cheetahSite/spacer.gif
Binary files differ
diff --git a/examples/webware_examples/hello_world.py b/examples/webware_examples/hello_world.py
new file mode 100644
index 0000000..a3f6aa5
--- /dev/null
+++ b/examples/webware_examples/hello_world.py
@@ -0,0 +1,8 @@
+templateDef = '''
+Hello World!
+'''
+
+from Cheetah.Templates.SkeletonPage import SkeletonPage
+class hello_world(SkeletonPage):
+ def initializeTemplate(self):
+ self.extendTemplate(templateDef)
diff --git a/examples/webware_examples/webwareSite/WebwareSiteTemplate.tmpl b/examples/webware_examples/webwareSite/WebwareSiteTemplate.tmpl
new file mode 100644
index 0000000..7f39859
--- /dev/null
+++ b/examples/webware_examples/webwareSite/WebwareSiteTemplate.tmpl
@@ -0,0 +1,459 @@
+#extend Cheetah.Templates.SkeletonPage
+
+##============================================================================##
+## macros for the Webware site
+
+#macro Python()
+<A HREF="http://www.python.org">Python</A>
+#end macro
+
+#macro PHP()
+<A HREF="http://www.php.net">PHP</A>
+#end macro
+
+#macro Zope()
+<A HREF="http://www.zope.org">Zope</A>
+#end macro
+
+#macro ASP()
+<A HREF="http://www.asp.net">ASP</A>
+#end macro
+
+#macro JSP()
+<A HREF="http://java.sun.com/products/jsp/">JSP</A>
+#end macro
+
+#macro ColdFusion()
+<A HREF="http://www.allaire.com">ColdFusion</A>
+#end macro
+
+#macro ASP()
+<A HREF="http://www.asp.net">ASP</A>
+#end macro
+
+#macro insetBox(width=170, boxTitle='', boxContents='')
+#cache
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$width>
+ <TR>
+ <TD COLSPAN=3 HEIGHT=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD> ## force full width
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="$mainTbl.innerFrameColor"> ## force full width
+ <DIV CLASS="insetBoxTitleContainer"><DIV CLASS="insetBoxTitle">$boxTitle</DIV></DIV>
+ </TD>
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD> ## force full width
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN=3 HEIGHT=1 BGCOLOR="$insetBoxes.titleFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE VALIGN="top" WIDTH=$width BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD WIDTH=1 bgcolor="$insetBoxes.frameColor">#spacer()</TD>
+ <TD WIDTH=900 BGCOLOR="$insetBoxes.bgcolor"> ## force to full width
+ ## now begin the contents cell of the insetBox
+#end cache
+ $boxContents
+#cache
+ ## end insetBox
+ </TD>
+ <TD WIDTH=1 BGCOLOR="$insetBoxes.frameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$width>
+ <TR>
+ <TD HEIGHT=1 BGCOLOR="$insetBoxes.frameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+#end cache
+#end macro
+##============================================================================##
+
+
+
+##============================================================================##
+#data
+
+title = "Webware - The Python-Powered Internet Platform"
+siteDomainName = "webware.sourceforge.net"
+siteCopyrightName= "The Webware Development Team"
+
+
+bodyTagAttribs = {"bgcolor": "black",
+ "text":"#000033", #333333
+ }
+
+navBar = {"bgcolor":"#3366CC", #EBEBEB #E0E0E0
+ }
+
+locationBar = {"bgcolor":"#3366CC", #EBEBEB #E0E0E0
+ "frameColor":"#CCCCCC",
+ }
+
+mainTbl = {"width":"90%",
+ "align":"center",
+ "contentsBgColor":"white",
+ "outerFrameColor":"#6699FF", #FFC850 #BDD4F1
+ "innerFrameColor":"#3366CC", #0059B2
+ "innerFrameWidth":8,
+ }
+
+insetBoxes = {"width":170,
+ "frameColor":"#DDDDDD", #000033
+ "titleFrameColor":"black", #000033
+ "bgcolor":"#FAFAFA",
+ }
+
+
+_sanSerifFonts = """helvetica, arial, "lucida sans", sans-serif"""
+
+_stylesheets = {
+ "H1.mainText": {"margin":"7px 2px",
+ "font-size":"small",
+ "font-weight":"bold",
+ "font-family": _sanSerifFonts,
+ },
+ ".mainText": {"margin-left":"10px"},
+
+ ".navBarContainer": {"padding": "4px 0px", "color":"white"},
+ ".navBar, A.navBar:link, A.navBar:visited": {"font-size":"small",
+ "font-weight":"bold",
+ "color":"white",
+ "text-decoration":"none",
+ "font-family": _sanSerifFonts,
+ },
+ "A.navBar:hover, A.navBar:active": {"text-decoration":"underline"},
+
+ ".locationBarContainer": {"padding": "2px 10px"},
+ ".locationBar, A.locationBar:link, A.locationBar:visited": {"font-size":"x-small",
+ "color":"#666666",
+ "text-decoration":"none",
+ "font-family": _sanSerifFonts,
+ },
+ "A.locationBar:hover, A.locationBar:active": {"text-decoration":"underline"},
+
+ ".copyrightFooter": {"color":"white", "font-size":"9pt"},
+
+ ".insetBoxTitleContainer":{"padding": "2px 5px",
+ "color":"white",
+ "font-weight":"bold",
+ },
+ ".insetBoxTitle":{"color":"white",
+ "font-size":"x-small",
+ "font-weight":"bold",
+ "text-decoration":"none",
+ "font-family": _sanSerifFonts,
+ },
+ ".insetBoxContainer":{"padding": "2px 2px 2px 5px"},
+ ".insetBox":{"font-size":"x-small",
+ "font-family": _sanSerifFonts,
+ },
+ "H1.insetBox":{"margin": "5px 5px",
+ "padding": "0px",
+ "font-size":"x-small",
+ "font-weight":"bold",
+ "font-family": _sanSerifFonts
+ },
+
+ "P.insetBox":{"margin": "2px 5px 7px 10px",
+ "padding": "0px",
+ "font-family": _sanSerifFonts
+ },
+ "A.insetBox:link, A.insetBox:visited":{"font-size":"x-small",
+ "text-decoration":"none",
+ },
+ "A.insetBox:hover, A.insetBox:active": {"text-decoration":"underline"},
+
+ ".listItems": {"margin-bottom":"200px"},
+ }
+
+_stylesheetsOrder = ["H1.mainText",
+ ".mainText",
+ ".navBarContainer",
+ ".navBar, A.navBar:link, A.navBar:visited",
+ "A.navBar:hover, A.navBar:active",
+ ".locationBarContainer",
+ ".locationBar, A.locationBar:link, A.locationBar:visited",
+ "A.locationBar:hover, A.locationBar:active",
+ ".copyrightFooter",
+ ".insetBoxTitleContainer",
+ ".insetBoxTitle",
+ ".insetBoxContainer",
+ ".insetBox",
+ "H1.insetBox",
+ "P.insetBox",
+ "A.insetBox:link, A.insetBox:visited",
+ "A.insetBox:hover, A.insetBox:active",
+ ".listItems",
+ ]
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from SkeletonPage
+#redefine bodyContents
+
+#####################
+#block header
+
+#end block header
+#####################
+
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD>
+ #####################
+ #block mainTblOuterHeader
+ <DIV ALIGN="center"><IMG SRC="webware_title_red-white_fat.gif" ALT="Webware"></DIV>
+ <DIV ALIGN="center"><IMG SRC="webware_subtitle_black.gif" ALT="The
+ Python-Powered Internet Platform"></DIV>
+ #spacer(1,5)
+
+ #end block mainTblOuterHeader
+ #####################
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 bgcolor="$mainTbl.outerFrameColor">#spacer()</TD>
+ ## top line of the mainTbl frame
+ </TR>
+</TABLE>
+
+
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 bgcolor="$mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=900> ## force to full width in Netscape
+ #####################
+ #block mainTblInnerHeader
+
+ ##############
+ #block navBar
+ <TABLE WIDTH=100% BGCOLOR="$navBar.bgcolor" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+ <DIV ALIGN="center" CLASS="navBarContainer">
+ <A CLASS="navBar" HREF="index.py">Home</A>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+ <A CLASS="navBar" HREF="learn.py">Learn</A>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+ <A CLASS="navBar" HREF="download.py">Download</A>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+ <A CLASS="navBar" HREF="contribute.py">Contribute</A>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+ <A CLASS="navBar" HREF="communicate.py">Communicate</A>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ #end block navBar
+ ##############
+
+ #end block mainTblInnerHeader
+ #####################
+ </TD>
+ <TD WIDTH="1" bgcolor="$mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=$mainTbl.innerFrameWidth bgcolor="$mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH=900 HEIGHT=1 BGCOLOR="black">#spacer(100)</TD> ## force to full width in Netscape
+ <TD WIDTH=$mainTbl.innerFrameWidth bgcolor="$mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH="1" BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+
+## MainTbl - contents ##
+
+<TABLE ALIGN=$mainTbl.align VALIGN="top" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=$mainTbl.innerFrameWidth bgcolor="$mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH=1 BGCOLOR="black">#spacer()</TD>
+
+ <TD BGCOLOR="$mainTbl.contentsBgColor">
+
+ ###################
+ #block locationBar
+ <TABLE WIDTH=100% BGCOLOR="#EBEBEB" BORDER=0 CELLPADDING=0 CELLSPACING=0>
+ <TR>
+ <TD>
+ <DIV CLASS="locationBarContainer">
+ ###################
+ #block locationBarContents
+ <A CLASS="locationBar" HREF="index.py">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="download.py">Download</A>
+ #end block locationBarContents
+ ###################
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD HEIGHT=1 BGCOLOR="$locationBar.frameColor">#spacer()</TD>
+ </TR>
+ </TABLE>
+
+ #end block locationBar
+ ###################
+
+
+
+ ######################
+ #block mainTblContents
+
+ #spacer(1,5)
+
+ <TABLE VALIGN="top" WIDTH=100% BORDER=0 CELLPADDING=10 CELLSPACING=0>
+ <TR>
+ <TD VALIGN="top">
+ ################
+ #block leftSideBar
+ <DIV ALIGN="center"><IMG SRC="onion_blue_on_white.gif" ALT=""></DIV>
+
+ <BR>
+
+ ##======================================
+ #callMacro insetBox(boxTitle="Sections")
+ #arg boxContents
+ <DIV CLASS="insetBox">
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="learn.py">Learn</A></H1>
+ <P CLASS="insetBox">
+ Manual<BR>
+ Tutorials<BR>
+ Tips and Tricks<BR>
+ Articles<BR>
+ Language Comparisons<BR>
+ Developer Information<BR>
+ </P>
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="download.py">Download</A></H1>
+ <P CLASS="insetBox">
+ Stable Releases<BR>
+ CVS Snapshots<BR>
+ Third-Party Packages<BR>
+ Browse the CVS<BR>
+ </P>
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="contribute.py">Contribute</A></H1>
+ <P CLASS="insetBox">
+ Links to Webware Sites<BR>
+ Bug Reports<BR>
+ Patches and New Code<BR>
+ Tutorials<BR>
+ Tips and Tricks<BR>
+ Articles<BR>
+ Language Comparisons<BR>
+ </P>
+
+ <H1 CLASS="insetBox"><A CLASS="insetBox" HREF="communicate.py">Communicate</A></H1>
+ <P CLASS="insetBox">
+ News<BR>
+ Mailing Lists<BR>
+ The Developers<BR>
+ Introduce Yourself<BR>
+ </P>
+
+ </DIV> ## end insetBox
+ #end arg
+ #end callMacro
+ ##======================================
+
+ #end block leftSideBar
+ ################
+
+ </TD>
+ <TD VALIGN="top" WIDTH=80%>
+ ########################
+ #block mainContentsCell
+ #end block mainContentsCell
+ ########################
+ </TD>
+ </TR>
+ </TABLE>
+
+ #spacer(1,200)
+ #end block mainTblContents
+ ######################
+ </TD>
+
+ <TD WIDTH=1 BGCOLOR="black">#spacer()</TD>
+ <TD WIDTH=$mainTbl.innerFrameWidth BGCOLOR="$mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH="1" BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+
+## MainTbl - closure ##
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=$mainTbl.innerFrameWidth bgcolor="$mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH=900 BGCOLOR="black">#spacer(100)</TD> ## force to full width in Netscape
+ <TD WIDTH=$mainTbl.innerFrameWidth bgcolor="$mainTbl.innerFrameColor">#spacer()</TD>
+ <TD WIDTH="1" BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ <TD WIDTH=900 BGCOLOR="$mainTbl.innerFrameColor">#spacer(1,25)</TD> ## force to full width in Netscape
+ <TD WIDTH="1" BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+</TABLE>
+
+<TABLE ALIGN=$mainTbl.align BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=$mainTbl.width>
+ <TR>
+ <TD WIDTH=1 HEIGHT=1 BGCOLOR="$mainTbl.outerFrameColor">#spacer()</TD>
+ </TR>
+ <TR>
+ <TD>
+ #####################
+ #block mainTblOuterFooter
+ <DIV CLASS="copyrightFooter">
+ Copyright &copy; 1999 - #currentYr() The Webware Development Team. All rights reserved.
+ </DIV>
+ <BR>
+
+ <DIV CLASS="copyrightFooter" ALIGN="center">Hosted on<BR>
+ <A HREF="http://sourceforge.net"><IMG BORDER=0 SRC="sourceforge_logo.gif" ALT="sourceforge.net"></A>
+ </DIV>
+
+ ##<DIV ALIGN="center"><IMG SRC="webware_logo.gif"></DIV>
+ ##<DIV ALIGN="center"><IMG SRC="webware_slogan_bw.gif"></DIV>
+
+ #end block mainTblOuterFooter
+ #####################
+ </TD>
+ </TR>
+</TABLE>
+
+
+#####################
+#block footer
+<BR>
+<BR>
+<BR>
+#end block footer
+#####################
+
+
+#end redefine bodyContents
+## from SkeletonPage
+##============================================================================##
diff --git a/examples/webware_examples/webwareSite/communicate.tmpl b/examples/webware_examples/webwareSite/communicate.tmpl
new file mode 100644
index 0000000..0d56a5b
--- /dev/null
+++ b/examples/webware_examples/webwareSite/communicate.tmpl
@@ -0,0 +1,29 @@
+#extend WebwareSiteTemplate
+
+##============================================================================##
+#data
+
+title = "Webware - The Python-Powered Internet Platform - Communicate"
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.py">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="communicate.py">Communicate</A>
+#end redefine locationBarContents
+## from WebwareSiteTemplate
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine mainContentsCell
+This is the "communicate" page, and it\'s blank for now!
+
+#end redefine mainContentsCell
+## from WebwareSiteTemplate
+##============================================================================##
diff --git a/examples/webware_examples/webwareSite/contribute.tmpl b/examples/webware_examples/webwareSite/contribute.tmpl
new file mode 100644
index 0000000..593e61d
--- /dev/null
+++ b/examples/webware_examples/webwareSite/contribute.tmpl
@@ -0,0 +1,29 @@
+#extend WebwareSiteTemplate
+
+##============================================================================##
+#data
+
+title = "Webware - The Python-Powered Internet Platform - Contribute"
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.py">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="contribute.py">Contribute</A>
+#end redefine locationBarContents
+## from WebwareSiteTemplate
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine mainContentsCell
+This is the "contribute" page, and it\'s blank for now!
+
+#end redefine mainContentsCell
+## from WebwareSiteTemplate
+##============================================================================##
diff --git a/examples/webware_examples/webwareSite/download.tmpl b/examples/webware_examples/webwareSite/download.tmpl
new file mode 100644
index 0000000..71485aa
--- /dev/null
+++ b/examples/webware_examples/webwareSite/download.tmpl
@@ -0,0 +1,29 @@
+#extend WebwareSiteTemplate
+
+##============================================================================##
+#data
+
+title = "Webware - The Python-Powered Internet Platform - Download"
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.py">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="download.py">Download</A>
+#end redefine locationBarContents
+## from WebwareSiteTemplate
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine mainContentsCell
+This is the download page, and it\'s blank for now!
+
+#end redefine mainContentsCell
+## from WebwareSiteTemplate
+##============================================================================##
diff --git a/examples/webware_examples/webwareSite/index.tmpl b/examples/webware_examples/webwareSite/index.tmpl
new file mode 100644
index 0000000..5c7b82b
--- /dev/null
+++ b/examples/webware_examples/webwareSite/index.tmpl
@@ -0,0 +1,138 @@
+#extend WebwareSiteTemplate
+
+###################
+#redefine locationBar
+
+#end redefine locationBar
+###################
+
+
+########################
+#redefine mainContentsCell
+
+<H1 CLASS="mainText">What is Webware?</H1>
+
+<P CLASS="mainText">
+Webware is an internet development platform powered by
+#Python(), the
+Open Source programming language developed by Guido van Rossum.</P>
+
+<H1 CLASS="mainText">What does Webware provide?</H1>
+<UL>
+ <LI>The strength of <A HREF="http://jakarta.apache.org">server-side Java</A>,
+ without its complexity.</LI>
+
+ <LI>The power of server-side <A HREF="http://perl.apache.org/">Perl</A>,
+ without its syntax.</LI>
+
+ <LI>The Python of #Zope(), without its headaches.</LI>
+ <LI>The flexibility of <A HREF="http://hoohoo.ncsa.uiuc.edu/cgi/intro.html">CGI</A>,
+ without its overhead.</LI>
+
+ <LI>The simplicity of #PHP(), without its limitations.</LI>
+ <LI>The capabilities of #ASP() and #ColdFusion(), without their
+ price tag.</LI>
+</UL>
+<P CLASS="mainText">
+...The power of the web, with the ease of #Python()!
+</P>
+
+
+<H1 CLASS="mainText">Cut the marketing-speak! I want details.</H1>
+
+<P CLASS="mainText">
+ok ... Webware provides:
+<UL>
+ <LI CLASS=".listItems">a fast, reliable, extensible, and scalable application server.</LI>
+
+ <LI CLASS=".listItems">coding in #Python(): a powerful object-orientated language.
+ Python dramatically improves developer productivity and code readible over Java, C++, and
+ other compiled languages. Furthermore, it's easier
+ to learn than other interpreted languages.</LI>
+
+ <LI CLASS=".listItems">support for several development approaches:
+ using pure Python Servlets as
+ in Java Servlets; using embedded PSP script as in ASP, PHP, JSP, and embed-Perl;
+ using templating languages as in Velocity and WebMacro;
+ and any combination of the above.</LI>
+
+ <LI CLASS=".listItems">full access to all Python modules.
+ Webware doesn't require you jump through hoops to import relevant Python modules.</LI>
+
+ <LI CLASS=".listItems">an extensive suite of add-ons and tools.</LI>
+
+ <LI CLASS=".listItems">automatic management of sessions, cookies, HTTP headers, etc.</LI>
+
+ <LI CLASS=".listItems">extensive support for XML, SOAP, XML-RPC,
+ COM, and CORBA through Python.</LI>
+
+ <LI CLASS=".listItems">structured exception handling through Python.
+ This makes Webware much suitable for large complex projects than environments
+ without structured exception handling, like PHP.</LI>
+
+ <LI CLASS=".listItems">full object persistance and caching.
+ This feature of the appserver a major advantage over solutions
+ that are embedded in the webserver process, such as PHP where
+ it costs over $2000US to purchase an add-on that only caches the
+ byte-compiled code.</LI>
+
+ <LI CLASS=".listItems">database connection persistance and pooling.</LI>
+
+ <LI CLASS=".listItems">portability.
+ It works anywhere Python works: Linux, Unixes, Windows, OS2, etc.</LI>
+
+ <LI CLASS=".listItems">web server portability.
+ It works with Apache, IIS, and most others.</LI>
+
+ <LI CLASS=".listItems">web server independence.
+ The application server runs in a separate process and can
+ even run on separate machines. One webserver can communicate with multiple application
+ servers, and vice-versa. It work crash your web-server and your webserver
+ wont crash it. Load-balancing is easy.</LI>
+
+ <LI CLASS=".listItems">protocol independence.
+ Although the application server was developed with HTTP in mind, it can be
+ extended to work with any TCP/IP based network protocol,
+ even <A HREF="http://www.blug.linux.no/rfc1149/">CPIP</A> ;-).</LI>
+
+ <LI CLASS=".listItems">a powerful template framework that separates the page logic
+ from its design/display and supports a reusable component-based design.</LI>
+
+ <LI CLASS=".listItems">interopability with other programming languages,
+ such as C, C++ and Java, through Python's extension framework.</LI>
+
+ <LI CLASS=".listItems">full source code.
+ All code is licensed under the 'Open Source' Python license, which
+ allows for unrestricted use, modification, and redistribution. Unlike the
+ GNU GPL, it allows the code to be used in commercial products.
+ </LI>
+
+ <LI CLASS=".listItems">and most importantly, an active and supportive developer community!</LI>
+
+</UL>
+</P>
+
+
+<H1 CLASS="mainText">What's with the onion?!</H1>
+<P CLASS="mainText"> Onions are
+ubiquitous. They grow almost anywhere and can be used in almost any dish. You'll
+find them from bachelor pads to haut cuisine restaurants, because they work well with
+others and are hard to botch, yet offer a surprising array of taste in the right
+hands.</P>
+
+<P CLASS="mainText">Onions are layered. Thus, they can be transformed into an
+endless range of shapes. You can cook with an entire onion, or even several, but you
+can also just slice off a few rings. </P>
+
+<P CLASS="mainText">Onions are easy to understand. You don't need expensive training
+to cook with them.</P>
+
+<P CLASS="mainText"> So it should be with internet development platforms. They
+should be hardy and work well with others; be easy to use for simple and complex
+tasks alike; should allow you to use a little or alot, depending on your tastes, and
+they shouldn't require a computer science degree to be understood. But, unlike
+onions, they shouldn't they make you cry ;-)</P>
+
+
+#end redefine mainContentsCell
+########################
diff --git a/examples/webware_examples/webwareSite/learn.tmpl b/examples/webware_examples/webwareSite/learn.tmpl
new file mode 100644
index 0000000..18bf8f4
--- /dev/null
+++ b/examples/webware_examples/webwareSite/learn.tmpl
@@ -0,0 +1,33 @@
+#extend WebwareSiteTemplate
+
+##============================================================================##
+#data
+
+title = "Webware - The Python-Powered Internet Platform - Learn"
+#end data
+#data
+def testFunc():
+ return 1234
+
+#end data
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine locationBarContents
+ <A CLASS="locationBar" HREF="index.py">Home</A>&nbsp;&gt;&nbsp;
+ <A CLASS="locationBar" HREF="learn.py">Learn Webware</A>
+#end redefine locationBarContents
+## from WebwareSiteTemplate
+##============================================================================##
+
+
+##============================================================================##
+## from WebwareSiteTemplate
+#redefine mainContentsCell
+This is the "Learn Webware" page, and it\'s blank for now!
+<BR>Testing $testFunc
+#end redefine mainContentsCell
+## from WebwareSiteTemplate
+##============================================================================##
diff --git a/examples/webware_examples/webwareSite/onion_blue_on_white.gif b/examples/webware_examples/webwareSite/onion_blue_on_white.gif
new file mode 100644
index 0000000..2e9c585
--- /dev/null
+++ b/examples/webware_examples/webwareSite/onion_blue_on_white.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/onion_blue_on_white_large.gif b/examples/webware_examples/webwareSite/onion_blue_on_white_large.gif
new file mode 100644
index 0000000..1690cc0
--- /dev/null
+++ b/examples/webware_examples/webwareSite/onion_blue_on_white_large.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/sourceforge_logo.gif b/examples/webware_examples/webwareSite/sourceforge_logo.gif
new file mode 100644
index 0000000..08589d2
--- /dev/null
+++ b/examples/webware_examples/webwareSite/sourceforge_logo.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/spacer.gif b/examples/webware_examples/webwareSite/spacer.gif
new file mode 100644
index 0000000..5bfd67a
--- /dev/null
+++ b/examples/webware_examples/webwareSite/spacer.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webWare.gif b/examples/webware_examples/webwareSite/webWare.gif
new file mode 100644
index 0000000..cf48c95
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webWare.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webWare_blueBG.gif b/examples/webware_examples/webwareSite/webWare_blueBG.gif
new file mode 100644
index 0000000..606e8b7
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webWare_blueBG.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webWare_subtitle.gif b/examples/webware_examples/webwareSite/webWare_subtitle.gif
new file mode 100644
index 0000000..de314c4
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webWare_subtitle.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webonions.gif b/examples/webware_examples/webwareSite/webonions.gif
new file mode 100644
index 0000000..40e8510
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webonions.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_logo.gif b/examples/webware_examples/webwareSite/webware_logo.gif
new file mode 100644
index 0000000..58a4eb3
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_logo.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_slogan_bw.gif b/examples/webware_examples/webwareSite/webware_slogan_bw.gif
new file mode 100644
index 0000000..8d7a41f
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_slogan_bw.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_subtitle_black.gif b/examples/webware_examples/webwareSite/webware_subtitle_black.gif
new file mode 100644
index 0000000..491284a
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_subtitle_black.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_subtitle_inner_frame.gif b/examples/webware_examples/webwareSite/webware_subtitle_inner_frame.gif
new file mode 100644
index 0000000..28e32dc
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_subtitle_inner_frame.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_title_bw.gif b/examples/webware_examples/webwareSite/webware_title_bw.gif
new file mode 100644
index 0000000..338cda4
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_title_bw.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_title_red-white.gif b/examples/webware_examples/webwareSite/webware_title_red-white.gif
new file mode 100644
index 0000000..366ddab
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_title_red-white.gif
Binary files differ
diff --git a/examples/webware_examples/webwareSite/webware_title_red-white_fat.gif b/examples/webware_examples/webwareSite/webware_title_red-white_fat.gif
new file mode 100644
index 0000000..8f4b79a
--- /dev/null
+++ b/examples/webware_examples/webwareSite/webware_title_red-white_fat.gif
Binary files differ