Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > f6c029cb6d7f91d967561f80e604bd05 > files > 517

python-nevow-0.9.32-2mdv2010.0.noarch.rpm

from nevow import rend
import itodo
import controller

# All this is only useful to dynamically update the web page code
# without restarting the server each time. As you can see below, you can 
# disable this by putting a false value in the Env object.

class Dispatch(rend.Page):
    def locateChild(self, ctx, segments):
        if itodo.IEnv(ctx).development:
            reload(controller)
        return controller.root.locateChild(ctx,segments)