Hi.

I'm having strange problems with childFactory and macros.

My application uses a template with the main content renderized with a macro.


<html>
  ....
  <n:invisible n:macro="main" />
  ...
</html>


I have a base class:

class Base(rend.rend):
  template = ... # The template to use as tha main content

  def macro_main(self, ctx):
     return loaders.xmlfile(self.template)


Every page derives from Base, and defines its template.

I do not understand why, but childFactory is called 2 times per request.
If I replace the n:macro with a n:render, childFactory is called 3 times?

Why is this happening?

What is the best solution to compose a page from a main template?


Thanks   Manlio Perillo

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to