[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erp5-base18]Fwd: erp5/Base18/Extensions/MigrateContent.py?rev=1.5 and C
From: |
Jean-Paul Smets |
Subject: |
[Erp5-base18]Fwd: erp5/Base18/Extensions/MigrateContent.py?rev=1.5 and CMF-1.3 |
Date: |
Tue, 13 Aug 2002 10:32:00 +0200 |
User-agent: |
KMail/1.4.2 |
FYI, Here is a nice email I received from Peter Funk last week. I just saw
that Peter is on the list. I would like to thank him a lot for trying and
making the patch.
Regarding the future of Base18
- it is and will be developed (I have 7 sites using it...)
- I am currently migrating it to Page Templates
- I will include the latest of Localizer into it
After that, someone (me?) should some day
- improve the translation / translation workflow interface
- improve the management of available translations (portal_translations)
- improve the integreation with KBabel
- put some icon in the texts so that people are incited to translate
text
- add some kind of automatic translation (linked to Babelfish)
DO you think there is some need for a Wiki ? (I would put it on the ERP5
site www.erp5.org so that the content is garanteed to be GPDL
http://www.gpdl.org)
Here are the news
JPS.
---------- Message transmis ----------
Subject: erp5/Base18/Extensions/MigrateContent.py?rev=1.5 and CMF-1.3
Date: Wed, 7 Aug 2002 08:24:37 +0200 (CEST)
From: address@hidden (Peter Funk)
To: address@hidden
Cc: address@hidden, address@hidden
Hi Jean-Paul Smets,
yesterday I stumbled over your exciting work (the Base18 product for Zope)
and downloaded it to play around with it.
I've tried it here on my notebook together with Zope-2.5.1 and
CMF-1.3beta1.
Due to this I noticed a API change in CMF which affects the operation of
erp5/Base18/Extensions/MigrateContent.py
The API of the method manage_addTypeInformation() of the class TypesTool
has changed between CMF-1.2 and CMF-1.3: This method now has another
formal parameter called 'add_meta_type', which (as far as my very limited
understanding of CMF goes :-( ) should be
'FactoryTypeInformation.meta_type' from CMFCore/TypesTool.py itself.
Don't ask me why.
To get around my problem I hacked the following patch into 'Base18'.
Please have a look at it:
------------------------------------------
--- MigrateContent.py.orig Wed Aug 7 08:05:49 2002
+++ MigrateContent.py Wed Aug 7 08:11:03 2002
@@ -39,6 +39,7 @@
import Products.CMFDefault.DiscussionItem
import Products.CMFDefault.Favorite
import Products.CMFCore.PortalFolder
+from Products.CMFCore.TypesTool import FactoryTypeInformation
# Destination
import Products.Base18.NewsItem
@@ -142,7 +143,15 @@
for oid in ptlist:
try: pt.manage_delObjects((oid,))
except: pass
- pt.manage_addTypeInformation(id=oid,typeinfo_name="Base18: Base18
%s" % oid) + try:
+ pt.manage_addTypeInformation(id=oid,
+ typeinfo_name="Base18: Base18 %s" % oid)
+ except TypeError:
+ pt.manage_addTypeInformation(
+ add_meta_type=FactoryTypeInformation.meta_type,
+ id=oid,
+ typeinfo_name="Base18: Base18 %s" % oid)
+
# Add Skin
try:
from Products.CMFCore.DirectoryView import createDirectoryView
------------------------------------------
With this patch the external method 'migrate_content' works successfully.
Regards, Peter
--
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen,
Germany)
-------------------------------------------------------
--
Jean-Paul Smets-Solanes
Nexedi CEO Tel. +33(0)6 62 05 76 14 Fax. +33(0)1 53 01 09 29
About www.nexedi.com
Nexedi is a consulting and development services company helping small and
medium organisations to choose open source / free software and fulfill
their IT application needs. Nexedi is the founder of the ERP5 project, a
Free / Open Source ERP software based on innovative technologies
(www.erp5.org).
About www.storever.com
Storever provides a reliable source for notebooks and servers preconfigured
with the GNU/Linux operating system
- [Erp5-base18]Fwd: erp5/Base18/Extensions/MigrateContent.py?rev=1.5 and CMF-1.3,
Jean-Paul Smets <=