[Twisted-web] loaders.xmlstr versus loader.xmlfile

Donovan Preston dp at ulaluma.com
Mon Dec 20 18:26:09 MST 2004

On Dec 20, 2004, at 4:00 PM, Michael Wilson wrote:

> 1. In the origional customform.py, which uses xmlstr, I see the getDoc
> and precompile methods being invokes (as expected). I verified this by
> putting breakpoints at these methods.
> 2. In the example below, these methods are NEVER called. __init__ is
> called when twisted loads the app, but that's it. We never actually
> call getDoc or precompile.

I still think there is a bug here, but I think I might have a 
workaround. Try loading the docfactory yourself, like so:

     def render_customForm(self, ctx, data):
         return webform.renderForms()[FORM_LAYOUT.load()]

Let me know if that helps.


More information about the Twisted-web mailing list