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

Changeset 1294

Show
Ignore:
Timestamp:
08/28/06 18:43:17
Author:
fumanchu
Message:

New tools.err_redirect.internal arg.

Files:

Legend:

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

    r1288 r1294  
    241241    cherrypy.log('\nRequest Headers:\n' + '\n'.join(h), "HTTP") 
    242242 
    243 def redirect(url=''): 
    244     """Raise cherrypy.HTTPRedirect to the given url.""" 
    245     raise cherrypy.HTTPRedirect(url) 
     243def redirect(url='', internal=True): 
     244    """Raise InternalRedirect or HTTPRedirect to the given url.""" 
     245    if internal: 
     246        raise cherrypy.InternalRedirect(url) 
     247    else: 
     248        raise cherrypy.HTTPRedirect(url) 
  • trunk/cherrypy/test/test_core.py

    r1290 r1294  
    112112            _cp_config = {"tools.err_redirect.on": True, 
    113113                          "tools.err_redirect.url": "/errpage", 
     114                          "tools.err_redirect.internal": False, 
    114115                          } 
    115116             

Hosted by WebFaction

Log in as guest/cpguest to create tickets