Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #313: sessiontest.py

Line 
1 # Sessiontest.py  Testing the Cherrypy session
2
3 import cherrypy
4
5 class Root:
6
7         @cherrypy.expose
8         def index(self):
9                 count = cherrypy.session.get('count',0) + 1
10                 cherrypy.session['count']=count
11                 return "Counter : %s"%count
12        
13
14 cherrypy.config.update(file='media/conf/bill.conf')
15 cherrypy.root=Root()
16 cherrypy.server.start()

Hosted by WebFaction

Log in as guest/cpguest to create tickets