Daniel Kiedrowski wrote:
> Hello Mailinglist,
> I've got another problem with the Martin Aspeli's book "Professional 
> Plone Development".
> 
> I am currently trieng to install RichDocument with my policy product 
> (chapter 7). First I tried it with RichDocument3.0, then with 
> RichDocument3.0.1 now with the eggified version RichDocument3.2 but I 
> get the same error every time.

Did you declare RD as a dependency in your policy product's
*profile* as well? That should take care of installing RD
into your site prior to itself.

Raphael

> 
> My setuphandler.py is wants to rename the new ContentType from 
> RichDocument to Web page:
> 
> def renameRichDocument(portal):
>      portal_types = getToolByName(portal, 'portal_types')
>      rich_document_fti = getattr(portal_types, 'RichDocument')
>      rich_document_fti.title = "Web page"
> 
> But I get an AttributeError with getattr(portal_types, 'RichDocument').
> 
> With Version 3.0 and 3.0.1, I used this version to install the Product 
> in an Install.py file:
> 
> PRODUCT_DEPENDENCIES = ('RichDocument',)
> EXTENSION_PROFILES = ('optilux.policy:default',)
> 
> def install(self, reinstall=False):
>      portal_quickinstaller = getToolByName(self, 'portal_quickinstaller')
>      portal_setup = getToolByName(self, 'portal_setup')
> 
>      for product in PRODUCT_DEPENDENCIES:
>          if reinstall and portal_quickinstaller.isProductInstalled(product):
>              portal_quickinstaller.reinstallProducts([product])
>              transaction.savepoint()
>          elif not portal_quickinstaller.isProductInstalled(product):
>              portal_quickinstaller.installProduct(product)
>              transaction.savepoint()
> 
> ...
> 
> But when I insert an 
> assert(portal_quickinstaller.isProductInstalled(product)) behind 
> portal_quickinstaller.installProduct(product), I get an assertion. It 
> seems like RichDocument isn't installed at all.
> 
> Now I try it with the eggified Version and added
> 
> install_requires=[
>            'setuptools',
>            'Plone',
>            'PIL',
>            'Products.RichDocument',
> ],
> 
> to my setup.py of my egg.
> 
> But I get the same error like with my preior version. What am I doing wrong?
> 
> Thx.
> Daniel Kiedrowski
> 
> P.S. Sorry for the double post.

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to