# Path: routing.py
# class CrudMapper(Mapper):
# 
#     def connectCrud(self, *args, **kwds):
#         """Create and connect crud Route to the Mapper. """
# 
#         args = list(args)
#         route = args.pop(0)
#         args = tuple(args)
#         
#         self.connect(route, action="index", *args, **kwds)
#         self.connect(route+'/{id}', *args, **kwds)
# 
#     def addCustomRoutes(self):
#         self.connect('/', controller="handlers:MainHandler")
#         self.connect('/main/:char', controller="handlers:AjaxTabsHandler", action="main")
#         self.connect('/skills/:char', controller="handlers:AjaxTabsHandler", action="skills")
#         self.connect('/journal/:char', controller="handlers:AjaxTabsHandler", action="journal")
#         self.connect('/stub', controller="handlers:AjaxTabsHandler", action="stub")
#         self.connect('/update', controller="handlers:UpdateHandler")
#         self.connect('/login', controller="handlers:LoginHandler")
#         self.connect('/logout', controller="handlers:LogoutHandler")
#         self.connect('/loginza_.html', controller="handlers:UpdateHandler",action="loginzaVerify")
#         return self


from google.appengine.ext.webapp import util
from routing import CrudMapper
from beaker.middleware import SessionMiddleware
import wsgi
#!/usr/bin/env python
# -*- coding: utf-8 -*-




map = CrudMapper(explicit = True).addCustomRoutes()


def main():

    application = wsgi.WSGIApplication(map, debug = True)


# Path: routing.py
# class CrudMapper(Mapper):
# 
#     def connectCrud(self, *args, **kwds):
#         """Create and connect crud Route to the Mapper. """
# 
#         args = list(args)
#         route = args.pop(0)
#         args = tuple(args)
#         
#         self.connect(route, action="index", *args, **kwds)
#         self.connect(route+'/{id}', *args, **kwds)
# 
#     def addCustomRoutes(self):
#         self.connect('/', controller="handlers:MainHandler")
#         self.connect('/main/:char', controller="handlers:AjaxTabsHandler", action="main")
#         self.connect('/skills/:char', controller="handlers:AjaxTabsHandler", action="skills")
#         self.connect('/journal/:char', controller="handlers:AjaxTabsHandler", action="journal")
#         self.connect('/stub', controller="handlers:AjaxTabsHandler", action="stub")
#         self.connect('/update', controller="handlers:UpdateHandler")
#         self.connect('/login', controller="handlers:LoginHandler")
#         self.connect('/logout', controller="handlers:LogoutHandler")
#         self.connect('/loginza_.html', controller="handlers:UpdateHandler",action="loginzaVerify")
#         return self


# Path: main.py
from google.appengine.ext.webapp import util
from routing import CrudMapper
from beaker.middleware import SessionMiddleware
import wsgi

#!/usr/bin/env python
# -*- coding: utf-8 -*-




map = CrudMapper(explicit = True).addCustomRoutes()


def main():

    application = wsgi.WSGIApplication(map, debug = True)


    application = SessionMiddleware(application, {'session.auto' : True, 'session.type' : 'ext:google'})