Merge Merge philikon-fix-lookup-priorities branch and switch Five to

version 1.3.3.
parent ab7fa428
......@@ -138,6 +138,12 @@ def makerequest(app, stdout=sys.stdout):
request = Request(sys.stdin, environ, response)
request._steps = ['noobject'] # Fake a published object
request['ACTUAL_URL'] = request.get('URL') # Zope 2.7.4
# set Zope3-style default skin so that the request is usable for
# Zope3-style view look-ups
from zope.app.publication.browser import setDefaultSkin
setDefaultSkin(request)
return app.__of__(RequestContainer(REQUEST=request))
......
......@@ -21,6 +21,7 @@ from Request import Request
from maybe_lock import allocate_lock
from mapply import mapply
from zExceptions import Redirect
from zope.app.publication.browser import setDefaultSkin
class Retry(Exception):
"""Raise this to retry a request
......@@ -185,6 +186,11 @@ def publish_module_standard(module_name,
if request is None:
request=Request(stdin, environ, response)
# make sure that the request we hand over has the
# default layer/skin set on it; subsequent code that
# wants to look up views will likely depend on it
setDefaultSkin(request)
response = publish(request, module_name, after_list, debug=debug)
except SystemExit, v:
must_die=sys.exc_info()
......
......@@ -189,6 +189,12 @@ def publish_module(module_name,
stdout=response.stdout
if request is None:
request=Request(stdin, environ, response)
# make sure that the request we hand over has the
# default layer/skin set on it; subsequent code that
# wants to look up views will likely depend on it
from zope.app.publication.browser import setDefaultSkin
setDefaultSkin(request)
for k, v in extra.items(): request[k]=v
response = publish(request, module_name, after_list, debug=debug)
except SystemExit, v:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment