<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">j'ai trouvé l'erreur mais a present j'ai une erreur de type ImportError sur cette ligne (de mon fichier install.py de mon nouveau produit ) :</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> <FONT size=2></DIV>
<P style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">from Products.CPSDefault.Installer import BaseInstaller</P>
<P></FONT> </P>
<P> </P>
<P>l'erreur déclenchée est :</P>
<P> </P><PRE><EM>Traceback (innermost last):
Module ZPublisher.Publish, line 113, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 40, in call_object
Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod
Module Products.ExternalMethod.ExternalMethod, line 111, in __init__
Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit
Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
Module App.Extensions, line 148, in getObject
- __traceback_info__: ('C:\\Program Files\\CPS3.4.0-3\\Data\\Products\\DaZopeFrenchPage\\Extensions\\install.py', 'DaZopeFrenchPage.install')
Module C:\Program Files\CPS3.4.0-3\Data\Products\DaZopeFrenchPage\Extensions\install.py, line 1, in ?
ImportError: cannot import name BaseInstaller</EM>
</PRE>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>Effectivement il n'y a pas d'installer dans CPSDefault où est-ce qu'est situé la methode "BaseInstaller"</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">apparament il y a une difference par rapport au guide du developpeur qui est basé sous cps3.3 alors que je suis sur la version 3.4 Alors sur cette nouvelle version comment faut-il proceder ? merci <BR><BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Message transféré ----<BR>De : aicha hirizi <aicha_hirizi@yahoo.fr><BR>À : ibibalias-cps@yahoo.fr; cps-users-fr@lists.nuxeo.com<BR>Envoyé le : Mardi, 4 Juillet 2006, 4h13mn 57s<BR>Objet : Re : RE : [CPS-users-fr] IndentationError ?<BR><BR>
<STYLE type=text/css><!-- DIV {margin:0px;}--></STYLE>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">oui il a bien l'indentation devant "<EM>les procedures necessaires dans lordre.""" </EM></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> <BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Message d'origine ----<BR>De : Ib <ibibalias-cps@yahoo.fr><BR>À : aicha hirizi <aicha_hirizi@yahoo.fr>; cps-users-fr@lists.nuxeo.com<BR>Envoyé le : Mardi, 4 Juillet 2006, 4h05mn 24s<BR>Objet : RE : [CPS-users-fr] IndentationError ?<BR><BR>Vous avez vérifié qu'il ya indentation à l'entrée (c'est-a-dire au début) de vos fonctions install()? Ca ne se voit pas dans votre message.<BR><BR><B><I>aicha hirizi <aicha_hirizi@yahoo.fr></I></B> a écrit :
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: 2px solid">
<STYLE type=text/css><!-- DIV {margin:0px;}--></STYLE>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial,helvetica,sans-serif">
<DIV>Bonjour </DIV>
<DIV> </DIV>
<DIV>En suivant le guide du developpeur CPS3, je veux installer un nouveau produit, mais en voulant executer</DIV>
<DIV> l'external method j'ai un erreur de type : IndentationError, que je n'arrive pas a corriger</DIV>
<DIV> </DIV>
<DIV>Traceback (innermost last):<BR> Module ZPublisher.Publish, line 113, in publish<BR> Module ZPublisher.mapply, line 88, in mapply<BR> Module ZPublisher.Publish, line 40, in call_object<BR> Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod<BR> Module Products.ExternalMethod.ExternalMethod, line 111, in __init__<BR> Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit<BR> Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction<BR> Module App.Extensions, line 148, in getObject<BR> - __traceback_info__: ('C:\\Program Files\\CPS3.4.0-3\\Data\\Products\\DaZopeFrenchPage\\Extensions\\install.py', 'DaZopeFrenchPage.install')<BR>IndentationError: expected an indented block (install.py, line 16)<BR></DIV>
<DIV> </DIV>
<DIV><STRONG>voici le contenu de mon fichier install.py :</STRONG></DIV>
<DIV> </DIV>
<DIV><FONT size=2>
<DIV>from Products . CPSDefault . Installer import BaseInstaller</DIV>
<DIV># skins pour surcharger celles de CPS</DIV>
<DIV>SKINS = (</DIV>
<DIV>('dzfp_default', 'Products/DaZopeFrenchPage/skins/default'),</DIV>
<DIV>('dzfp_images ', 'Products/DaZopeFrenchPage/skins/images'),</DIV>
<DIV>('dzfp_styles ', 'Products/DaZopeFrenchPage/skins/styles'),</DIV>
<DIV>)</DIV>
<DIV>class DZFPInstaller(BaseInstaller):</DIV>
<DIV>product_name = 'DaZopeFrenchPage'</DIV>
<DIV>def install(self):</DIV>
<DIV>"""Methode d installation qui declenche toutes</DIV>
<DIV>les procedures necessaires dans lordre.""" <-------------------------------------- <STRONG>ligne 16 </STRONG></DIV>
<DIV>self.log("Installation de DaZopeFrenchPage")</DIV>
<DIV>self.log("Mise en place des skins")</DIV>
<DIV>self.setupSkins(SKINS)</DIV>
<DIV>self.setSkinsOnTop(SKINS)</DIV>
<DIV>self.log("Fin de lâinstallation de DaZopeFrenchPage")</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>def install(self):</DIV>
<DIV>"""Passer dâun site CPSDefault a un site DaZopeFrenchPage."""</DIV>
<DIV>installer = DZFPInstaller(self)</DIV>
<DIV>installer.install()</DIV>
<DIV>return installer.logResult()</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>J'ai essayé de modifier le code mais l'erreur persiste !</DIV></FONT></DIV></DIV>_______________________________________________<BR>cps-users-fr <BR>Adresse de la liste : cps-users-fr@lists.nuxeo.com<BR>Gestion de l'abonnement : <BR></BLOCKQUOTE><BR>
<P>
<HR SIZE=1>
Avez-vous essayé le <B><A id=bodyLinks href="http://fr.rd.yahoo.com/evt=40581/*http://fr.promotions.yahoo.com/mail/nouveaumail.html" target=_blank rel=nofollow>nouveau Yahoo! Mail ?</A></B> Plus rapide, plus efficace... simplement révolutionnaire ! Découvrez-le.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></DIV></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></div></body></html>