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

Changeset 1078

Show
Ignore:
Timestamp:
04/26/06 17:51:55
Author:
fumanchu
Message:

Only one failing test now (sessions)!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cprequest.py

    r1075 r1078  
    230230    """Find and run the appropriate page handler.""" 
    231231    request = cherrypy.request 
    232     handler, opath, vpath = find(path) 
     232    handler, opath, vpath = find_handler(path) 
    233233     
    234234    # Remove "root" from opath and join it to get found_object_path 
     
    243243    cherrypy.response.body = handler(*vpath, **request.params) 
    244244 
    245 def find(objectpath): 
     245def find_handler(objectpath): 
     246    """Find the appropriate page handler for the given path.""" 
    246247    objectTrail = _cputil.get_object_trail(objectpath) 
    247248    names = [name for name, candidate in objectTrail] 
  • trunk/cherrypy/_cputil.py

    r1072 r1078  
    4848    # Convert the list of names into a list of objects 
    4949    node = root 
    50     objectTrail = [
     50    objectTrail = [('root', root)
    5151    for name in nameList: 
    5252        # maps virtual names to Python identifiers (replaces '.' with '_') 
  • trunk/cherrypy/lib/encodings.py

    r1053 r1078  
    11import struct 
    22import time 
    3 import zlib 
    43 
    54import cherrypy 
  • trunk/cherrypy/test/test_static_filter.py

    r1056 r1078  
    109109        self.getPage("/error/thing.html") 
    110110        self.assertErrorPage(500) 
    111         self.assertInBody("TypeError: get_dir() takes at least 2 " 
     111        self.assertInBody("TypeError: staticdir() takes at least 2 " 
    112112                          "non-keyword arguments (1 given)") 
    113113         
  • trunk/cherrypy/tools.py

    r1076 r1078  
    281281            if not hasattr(cherrypy, "session"): 
    282282                cherrypy.session = _sessions.SessionWrapper() 
    283         cherrypy.request.hooks.attach('on_start_resource', init) 
     283        cherrypy.request.hooks.attach('before_request_body', init) 
    284284         
    285285        cherrypy.request.hooks.attach('before_finalize', _sessions.save) 
     
    302302            dispatch = tools.xmlrpc.dispatch 
    303303        """ 
     304        request = cherrypy.request 
    304305        request.hooks.attach('after_error_response', _xmlrpc.wrap_error) 
    305306         
     
    308309         
    309310        from cherrypy import _cprequest 
    310         handler, opath, vpath = _cprequest.find(path) 
     311        handler, opath, vpath = _cprequest.find_handler(path) 
    311312         
    312313        # Decode any leftover %2F in the virtual_path atoms. 
    313314        vpath = tuple([x.replace("%2F", "/") for x in vpath]) 
    314315         
    315         request = cherrypy.request 
    316316        body = handler(*(vpath + rpcparams), **request.params) 
    317317        conf = tool_config().get("xmlrpc", {}) 
  • trunk/cherrypy/tutorial/tut07_sessions.py

    r1070 r1078  
    22Tutorial - Sessions 
    33 
    4 Storing session data in CherryPy applications is very easy: cherrypy.request 
    5 provides a dictionary called sessionMap that represents the session 
     4Storing session data in CherryPy applications is very easy: cherrypy 
     5provides a dictionary called "session" that represents the session 
    66data for the current user. If you use RAM based sessions, you can store 
    77any kind of object into that dictionary; otherwise, you are limited to 
  • trunk/cherrypy/tutorial/tutorial.conf

    r650 r1078  
    11[global] 
    2 server.socketPort = 8080 
    3 server.threadPool = 10 
     2server.socket_port = 8080 
     3server.thread_pool = 10 
    44server.environment = "production" 
    55# server.showTracebacks = True 

Hosted by WebFaction

Log in as guest/cpguest to create tickets