[Twisted-Python] Uninteruptable infinite loop: Woven rendering

Alex Levy mesozoic at polynode.com
Sun Aug 10 12:19:57 EDT 2003

class TestPage(page.Page):
    template = '''
    <div model="prev">
    def wmfactory_prev(self, request):
        return TestPage()

This is an infinite loop. A Page class is both its own model and its own
view; despite the fact that you've made it part of the template here, it
will insert its own template and replace the <div/> you have.

So, when the submodel is created (a TestPage instance), it attempts to
render itself, which makes a TestPage instance as a submodel, which needs to
be rendered, and so on. Ad infinum.

Which begs the question, what are you trying to do? There is likely another
way around whatever problem you're trying to solve.

Alex Levy
WWW: http://mesozoic.geecs.org
"Never let your sense of morals prevent you from doing what is right."
 -- Salvor Hardin, Isaac Asimov's _Foundation_

More information about the Twisted-Python mailing list