[Twisted-web] [PATCH] doc/Nevow2004Tutorial.html

Lee Harr missive at hotmail.com
Sat Jul 10 15:20:08 MDT 2004


The tutorial mentions a (non-existent as far as I can see)
render_currentMonth method. This patch corrects it.
(sorry if there is wrapping trouble ...)


>diff -u Nevow2004Tutorial.html.orig Nevow2004Tutorial.html
--- Nevow2004Tutorial.html.orig Sat Jul 10 17:06:47 2004
+++ Nevow2004Tutorial.html      Sat Jul 10 17:11:16 2004
@@ -69,8 +69,8 @@
     ...
</pre>
<p>In this case, we have a dummy &lt;span&gt; node around the interesting 
portion of the template. This span node will not affect the presentation of 
the document, and is merely a carrier for some directives which will affect 
some nodes inside of the span. On this node, we see two directives: 
nevow:data=&quot;currentMonth&quot; and nevow:render=&quot;month&quot;. When 
nevow begins to render this span node, it will first invoke a method named 
data_currentMonth, and pass the resulting data to a method named 
render_month. The return value of the render_month method will replace the 
entire span in the rendering DOM and further processing will take place on 
it.</p>
-<p>Inside of the span node, there are two slots: <em>&lt;nevow:slot 
name=&quot;label&quot;&gt;</em> and <em>&lt;nevow:slot 
name=&quot;calendarBody&quot; /&gt;</em>. render_currentMonth will be sure 
to provide values to fill these slots before returning.</p>
-<p>Finally, inside of the span node there are two patterns: 
<em>nevow:pattern=&quot;calendarWeek&quot;</em> and 
<em>nevow:pattern=&quot;calendarDay&quot;</em>. The render_currentMonth 
method will make clones of these pattern nodes as it renders the 
calendar.</p>
+<p>Inside of the span node, there are two slots: <em>&lt;nevow:slot 
name=&quot;label&quot;&gt;</em> and <em>&lt;nevow:slot 
name=&quot;calendarBody&quot; /&gt;</em>. render_month will be sure to 
provide values to fill these slots before returning.</p>
+<p>Finally, inside of the span node there are two patterns: 
<em>nevow:pattern=&quot;calendarWeek&quot;</em> and 
<em>nevow:pattern=&quot;calendarDay&quot;</em>. The render_month method will 
make clones of these pattern nodes as it renders the calendar.</p>
<p>One last note: The &lt;tr 
<em>nevow:pattern=&quot;calendarWeek&quot;</em>&gt; pattern node has a 
nevow:render=&quot;remove&quot; directive. Nevow does not currently 
automatically remove pattern nodes from the template, so to prevent the 
dummy data from ending up in the output we use the render_remove method. 
render_remove is defined on the Page class, and simply returns ''.</p>
</div>
<div class="section" id="data-render-methods">



Looks like Nevow2004Tutorial.txt is probably generated from the same
source ...

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




More information about the Twisted-web mailing list