[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 <span> 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="currentMonth" and nevow:render="month". 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><nevow:slot
name="label"></em> and <em><nevow:slot
name="calendarBody" /></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="calendarWeek"</em> and
<em>nevow:pattern="calendarDay"</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><nevow:slot
name="label"></em> and <em><nevow:slot
name="calendarBody" /></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="calendarWeek"</em> and
<em>nevow:pattern="calendarDay"</em>. The render_month method will
make clones of these pattern nodes as it renders the calendar.</p>
<p>One last note: The <tr
<em>nevow:pattern="calendarWeek"</em>> pattern node has a
nevow:render="remove" 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