1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>SimpleTAL API</title>
<link href="../style/site.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>SimpleTAL API</h1>
<p id="subject">Documentation on how to use the SimpleTAL API.</p>
<div><p>SimpleTAL consists of four different modules: simpleTAL, simpleTALES, and simpleTALUtils. The API for each of these modules is documented separately:</p>
<ul>
<li><a href="api-simpletal.html">simpleTAL</a> - contains functions to compile HTML and XML templates into objects ready for use.</li>
<li><a href="api-simpletales.html">simpleTALES</a> - contains the Context class which provides the environment in which templates are expanded.</li>
<li><a href="api-simpletalutils.html">simpleTALUtils</a> - optional utility functions for dealing with SimpleTAL templates.</li>
<li><a href="api-simpleelementtree.html">simpleElementTree</a> - integration with ElementTree allowing XML documents to be parsed and placed directly into the Context instance.</li>
</ul>
<h2>Logging in SimpleTAL</h2>
<p>To control the output of logging messages from SimpleTAL it is necessary to retrieve the logger objects for each module, which can be done using:</p>
<pre><code>simpleTALLogger = logging.getLogger ("simpleTAL")
simpleTALESLogger = logging.getLogger ("simpleTALES")
</code></pre>
<p>The configuration of these loggers can then be adjusted as described in the logging library documentation. For example to stop warnings being logged:</p>
<pre><code>simpleTALLogger.setLevel (logging.ERROR)
simpleTALESLogger.setLevel (logging.ERROR)
</code></pre>
<p><a href="index.html">Back to SimpleTAL</a></p>
</div>
<p id="version">PubTal Version </p>
<div id="footer">
<p>File: api.txt</p>
<p>Last modified: Sat, 15 Aug 2009 12:30:36 BST</p>
<p>Copyright 2011 Colin Stewart</p>
<p title="PubTal is a template driven web site publisher.">Made with <a href="http://www.owlfish.com/software/PubTal/">PubTal</a> 3.5</p>
</div>
</body>
|