r13572 - in ArchGenXML/trunk: . src/archgenxml/templates

"Thomas Desvenain" <[email protected]> Wed, 06 Apr 2011 15:41:22 +0000
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: thomasdesvenain
Date: Wed Apr  6 15:41:22 2011
New Revision: 13572

Modified:
   ArchGenXML/trunk/CHANGES.txt
   ArchGenXML/trunk/src/archgenxml/templates/__init__product.pydtml
Log:
Avoid deprecated import warning under Zope 2.13+.

Modified: ArchGenXML/trunk/CHANGES.txt
==============================================================================
--- ArchGenXML/trunk/CHANGES.txt	(original)
+++ ArchGenXML/trunk/CHANGES.txt	Wed Apr  6 15:41:22 2011
@@ -4,8 +4,12 @@
 2.7 (unreleased)
 ----------------
 
+- Avoid deprecated import warning under Zope 2.13+.
+  [thomasdesvenain]
+
 - Fixed inconstancy between template name and portlet class by removing .pt in the generation
   [jihaisse]
+
 - Added method generation for portlet class.
   The portlet class will look like the classic portlet.
   [jihaisse]

Modified: ArchGenXML/trunk/src/archgenxml/templates/__init__product.pydtml
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/templates/__init__product.pydtml	(original)
+++ ArchGenXML/trunk/src/archgenxml/templates/__init__product.pydtml	Wed Apr  6 15:41:22 2011
@@ -13,7 +13,12 @@
 
 import os
 import os.path
+<dtml-if "generator.getOption('plone_target_version', package, 3.0) < 4.0">
 from Globals import package_home
+</dtml-if>
+<dtml-if "generator.getOption('plone_target_version', package, 3.0) >= 4.0">
+from App.Common import package_home
+</dtml-if>
 import Products.CMFPlone.interfaces
 from Products.Archetypes import listTypes
 from Products.Archetypes.atapi import *

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev