r252378 - zettwerk.ui/trunk/zettwerk/ui

"J??rg Kubaile" <svn-changes-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.collective.cvs
Message-ID <[email protected]>
Author: jkubaile
Date: Wed May  8 07:12:05 2013
New Revision: 252378

Modified:
   zettwerk.ui/trunk/zettwerk/ui/resources.py
Log:
changed imports needed for plone 4.3

Modified: zettwerk.ui/trunk/zettwerk/ui/resources.py
==============================================================================
--- zettwerk.ui/trunk/zettwerk/ui/resources.py	(original)
+++ zettwerk.ui/trunk/zettwerk/ui/resources.py	Wed May  8 07:12:05 2013
@@ -2,9 +2,17 @@
 from zope.interface import Interface
 from zope.component.globalregistry import getGlobalSiteManager
 from zope.security.checker import CheckerPublic, NamesChecker
-from zope.app.publisher.browser.directoryresource \
-    import DirectoryResourceFactory
-from zope.app.publisher.browser.resourcemeta import allowed_names
+
+try:
+    # Plone < 4.3
+    from zope.app.publisher.browser.directoryresource \
+        import DirectoryResourceFactory
+    from zope.app.publisher.browser.resourcemeta import allowed_names
+except ImportError:
+    # Plone >= 4.3
+    from zope.browserresource.directory import DirectoryResourceFactory
+    from zope.browserresource.metaconfigure import allowed_names
+
 import logging
 import os
 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.