[Zope-CMF] Relocating the files in a ZOPE product

suresh_vv sureshvv at hotmail.com
Mon Jan 12 03:10:43 EST 2004


> If I am right, I see two options for you:
> 
>   1.  create backward compatibility modules (under the old
>       "module-path") with the content:
> 
>         from new-module-path import new-class-name as old-class-name
> 
>   2.  use the "__module_aliases__" feature in the product's
>       "__init__.py" file.
> 
>       I am not sure, whether this feature is documented (if it is,
>       it is probably in the Zope Developper Guide).
>       You find an example (e.g.) in "PythonScripts".
> 

Thanks Dieter (and Chris) for the precise pointers to my slightly 
terse query.

Option 1. I dont prefer this option because I have subfolders like 
www and zpt in my particluar Product folder that also needs to be 
moved.

Option 2. This would be nice if it worked. As I understand, I need to 
mention only .py files (not individual classes) and only .py files 
that contain the class definitions (not utility files and such). 
There are 2 .py files (one with 3 class definitions and the other 
with 2).  I tried listing both, checked that the Product was loaded 
correctly in the Conterol panel, and still the objects are not loaded 
from the ZODB.

Any other ideas?




More information about the Zope-CMF mailing list