webgo/main.py

35 lines
1,019 B
Python
Executable file

import sys, traceback,string,time
import login,createaccount,helper,gamecreation,playgame,logout
from cherrypy import cpg
#clearsilver templates
import neo_cgi
import neo_util # you must import neo_cgi first...
import neo_cs # you must import neo_cgi first...
class WebGoSite:
def index(self):
print "simpleCookie:"+str(cpg.response.simpleCookie["WebGoSessionCookie"]["expires"])
return helper.cs_render("templates/main.cs")
index.exposed = True
cpg.root = WebGoSite()
cpg.root.createaccount = createaccount.CreateAccount()
cpg.root.login = login.Login()
cpg.root.logout = logout.Logout()
cpg.root.overview = login.Overview()
cpg.root.gamecreation = gamecreation.GameCreation()
cpg.root.playgame = playgame.PlayGame()
cpg.server.start(configMap={'sessionStorageType' : 'ram',
'sessionCookieName' : 'WebGoSessionCookie',
'sessionTimeout' : 15, #Session expires in n minutes
'staticContentList':
[['default.css','default.css'],
['img','img']]
}
)