[Checkins] SVN: zope.app.publication/trunk/ Use ISkinnable.providedBy(request) instead of IBrowserRequest as condition

Roger Ineichen roger at projekt01.ch
Mon Mar 9 21:14:59 EDT 2009


Log message for revision 97752:
  Use ISkinnable.providedBy(request) instead of IBrowserRequest as condition
  for calling setDefaultSkin. This at the same time removes dependency to
  the browser part of zope.publisher.

Changed:
  U   zope.app.publication/trunk/CHANGES.txt
  U   zope.app.publication/trunk/src/zope/app/publication/httpfactory.py

-=-
Modified: zope.app.publication/trunk/CHANGES.txt
===================================================================
--- zope.app.publication/trunk/CHANGES.txt	2009-03-10 01:01:02 UTC (rev 97751)
+++ zope.app.publication/trunk/CHANGES.txt	2009-03-10 01:14:59 UTC (rev 97752)
@@ -5,6 +5,10 @@
 3.5.2 (unreleased)
 ------------------
 
+- Use ISkinnable.providedBy(request) instead of IBrowserRequest as condition
+  for calling setDefaultSkin. This at the same time removes dependency to
+  the browser part of zope.publisher.
+
 - Remove deprecated code.
 
 - Use built-in set class instead of the deprecated sets.Set and thus

Modified: zope.app.publication/trunk/src/zope/app/publication/httpfactory.py
===================================================================
--- zope.app.publication/trunk/src/zope/app/publication/httpfactory.py	2009-03-10 01:01:02 UTC (rev 97751)
+++ zope.app.publication/trunk/src/zope/app/publication/httpfactory.py	2009-03-10 01:14:59 UTC (rev 97752)
@@ -19,8 +19,8 @@
 
 from zope import interface
 
-from zope.publisher.interfaces.browser import IBrowserRequest
-from zope.publisher.browser import setDefaultSkin
+from zope.publisher.interfaces import ISkinnable
+from zope.publisher.skinnable import setDefaultSkin
 
 from zope.app.publication import interfaces
 from zope.app.publication.requestpublicationregistry import factoryRegistry
@@ -55,7 +55,7 @@
 
         request = request_class(input_stream, env)
         request.setPublication(publication)
-        if IBrowserRequest.providedBy(request):
-            # only browser requests have skins
+        if ISkinnable.providedBy(request):
+            # only ISkinnable requests have skins
             setDefaultSkin(request)
         return request



More information about the Checkins mailing list