[Zope-Checkins]
SVN: Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/
whenever the request is created,
make sure that the default skin is set on it.
Philipp von Weitershausen
philikon at philikon.de
Sun Mar 26 11:35:56 EST 2006
Log message for revision 66176:
whenever the request is created, make sure that the default skin is set on it.
Changed:
U Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Publish.py
U Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Test.py
-=-
Modified: Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Publish.py
===================================================================
--- Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Publish.py 2006-03-26 16:32:29 UTC (rev 66175)
+++ Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Publish.py 2006-03-26 16:35:54 UTC (rev 66176)
@@ -21,6 +21,7 @@
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 @@
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()
Modified: Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Test.py
===================================================================
--- Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Test.py 2006-03-26 16:32:29 UTC (rev 66175)
+++ Zope/branches/philikon-fix-lookup-priorities/lib/python/ZPublisher/Test.py 2006-03-26 16:35:54 UTC (rev 66176)
@@ -189,6 +189,12 @@
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:
More information about the Zope-Checkins
mailing list