T.directive -> function/method names in stan
The formal code contains (in the examples.main module) this construct: T.body[ T.h1(data=T.directive('title'), render=rend.data), T.p(data=T.directive('description'), render=rend.data), T.directive('form example'), ], Can someone point me at the bit of nevow code that results in that calling: class anexample: def form_example(self, ctx): # stuff The stan flattener container a DirectiveSerializer that just looks for an IRendererFactory on the context and calls factory.renderer(ctx, name) but as far as I can tell it ought to end up calling: page.render_form('example')
On Fri, 01 Dec 2006 14:56:46 +0000, Phil Mayers
The formal code contains (in the examples.main module) this construct:
T.body[ T.h1(data=T.directive('title'), render=rend.data), T.p(data=T.directive('description'), render=rend.data), T.directive('form example'), ],
Can someone point me at the bit of nevow code that results in that calling:
class anexample: def form_example(self, ctx): # stuff
The stan flattener container a DirectiveSerializer that just looks for an IRendererFactory on the context and calls factory.renderer(ctx, name) but as far as I can tell it ought to end up calling:
page.render_form('example')
Indeed that is what Nevow does. Then, Formal takes over: it has a render_form method which looks up form_* methods and dispatches to them. Jean-Paul
Jean-Paul Calderone wrote:
Indeed that is what Nevow does. Then, Formal takes over: it has a render_form method which looks up form_* methods and dispatches to them.
Jean-Paul
Doh (slaps forehead). Thanks both Jean-Paul and Michael for pointing this out. I thought I was hallucinating some new behaviour of Nevow!
Phil Mayers
The formal code contains (in the examples.main module) this construct:
T.body[ T.h1(data=T.directive('title'), render=rend.data), T.p(data=T.directive('description'), render=rend.data), T.directive('form example'), ],
Can someone point me at the bit of nevow code that results in that calling:
class anexample: def form_example(self, ctx): # stuff
The stan flattener container a DirectiveSerializer that just looks for an IRendererFactory on the context and calls factory.renderer(ctx, name) but as far as I can tell it ought to end up calling:
page.render_form('example')
It does call that, I think :-) But the page inherits from forms.ResourceMixin, so the call goes here: http://forms-project.pollenation.net/cgi-bin/trac.cgi/browser/trunk/formal/f... Cheers, mwh -- . <- the point your article -> . |------------------------- a long way ------------------------| -- Christophe Rhodes, ucam.chat
participants (3)
-
Jean-Paul Calderone
-
Michael Hudson
-
Phil Mayers