Beispiel #1
0
    def __init__(self):
        self.warpBasePath = config['warpDir']
        self.warpStaticPath = self.warpBasePath.child('static')
        self.warpTemplatePath = self.warpBasePath.child("templates")

        siteTemplateDir = config['siteDir'].child("templates").path
        warpTemplateDir = self.warpTemplatePath.path
        nodeDir = config['siteDir'].child("nodes").path
        templateLookup.__init__(
            directories=[siteTemplateDir, warpTemplateDir, nodeDir],
            output_encoding="utf-8")

        handle_login = config.get('loginHandler', self.handle_login)
        handle_logout = config.get('logoutHandler', self.handle_logout)
        handle_comet = config.get('cometHandler', self.handle_comet)
        handle_warpstatic = config.get('warpstaticHandler',
                                       self.handle_warpstatic)
        handle_default = config.get('defaultHandler', self.handle_default)

        self.dispatch = {
            '__login__': handle_login,
            '__logout__': handle_logout,
            '_comet': handle_comet,
            '_warp': handle_warpstatic,
            '': handle_default,
        }

        self.caseInsensitiveUrl = False
Beispiel #2
0
    def __init__(self):
        self.warpBasePath = config['warpDir']
        self.warpStaticPath = self.warpBasePath.child('static')
        self.warpTemplatePath = self.warpBasePath.child("templates")

        siteTemplateDir = config['siteDir'].child("templates").path
        warpTemplateDir = self.warpTemplatePath.path
        nodeDir = config['siteDir'].child("nodes").path
        templateLookup.__init__(directories=[siteTemplateDir, warpTemplateDir, nodeDir], 
                                output_encoding="utf-8")

        handle_login = config.get('loginHandler', self.handle_login)
        handle_logout = config.get('logoutHandler', self.handle_logout)
        handle_comet = config.get('cometHandler', self.handle_comet)
        handle_warpstatic = config.get('warpstaticHandler', self.handle_warpstatic)
        handle_default = config.get('defaultHandler', self.handle_default)

        self.dispatch =  {
            '__login__': handle_login,
            '__logout__': handle_logout,
            '_comet': handle_comet,
            '_warp': handle_warpstatic,
            '': handle_default,
        }

        self.caseInsensitiveUrl = False
Beispiel #3
0
    def __init__(self):
        self.warpBasePath = config["warpDir"]
        self.warpStaticPath = self.warpBasePath.child("static")
        self.warpTemplatePath = self.warpBasePath.child("templates")

        siteTemplateDir = config["siteDir"].child("templates").path
        warpTemplateDir = self.warpTemplatePath.path
        templateLookup.__init__(directories=[siteTemplateDir, warpTemplateDir])

        self.dispatch = {
            "__login__": self.handle_login,
            "__logout__": self.handle_logout,
            "_comet": self.handle_comet,
            "_warp": self.handle_warpstatic,
            "": self.handle_default,
        }
Beispiel #4
0
    def __init__(self):
        self.warpBasePath = config['warpDir']
        self.warpStaticPath = self.warpBasePath.child('static')
        self.warpTemplatePath = self.warpBasePath.child("templates")

        siteTemplateDir = config['siteDir'].child("templates").path
        warpTemplateDir = self.warpTemplatePath.path
        templateLookup.__init__(directories=[siteTemplateDir, warpTemplateDir], output_encoding="utf-8")


        self.dispatch =  {
            '__login__': self.handle_login,
            '__logout__': self.handle_logout,
            '_comet': self.handle_comet,
            '_warp': self.handle_warpstatic,
            '': self.handle_default,
        }
Beispiel #5
0
    def __init__(self):
        self.warpBasePath = FilePath(__file__).parent().parent()
        self.warpStaticPath = self.warpBasePath.child('static')
        self.warpTemplatePath = self.warpBasePath.child("templates")

        siteTemplateDir = config['siteDir'].child("templates").path
        warpTemplateDir = self.warpTemplatePath.path
        templateLookup.__init__(directories=[siteTemplateDir, warpTemplateDir])


        self.dispatch =  {
            '__login__': self.handle_login,
            '__logout__': self.handle_logout,
            '_comet': self.handle_comet,
            '_warp': self.handle_warpstatic,
            '': self.handle_default,
        }