[Twisted-web] page with fragment keeps failing after correcting error in fragment

James Y Knight foom at fuhm.net
Mon Dec 6 11:02:01 MST 2004

On Dec 4, 2004, at 12:43 PM, Andrea Arcangeli wrote:
> In short I've a rend.Fragment like this:
> class fragment(rend.Fragment):
> 	docFactory = loaders.xmlfile('xml/somefragment.xml', ignoreDocType = 
> True)
> then I've some other page rendering the fragment inside:
> class basepage_class(rend.Page):
> 	def render_fragment(self, ctx, data):
> 		return fragment()
> So far so good, problem is that if I insert an xml syntax error in the
> fragment, I've to restart the server, or it never notices when I
> corrected it. I'm not sure if this is intentional.
> If you insert </p></p> into xml/somefragment.xml and you reload, you'll
> get the error. Then you delete the bogus string, and another error
> remains.

Hm, not intentional. loaders.xmlfile does cache the precompiled 
representation of the loaded XML, but it's supposed to check the mtime 
of the file and if it's modified, reload. Dunno where that's going 


More information about the Twisted-web mailing list