[Zope3-Users] Generation's install script
Lorenzo Gil Sanchez
lgs at sicem.biz
Thu Apr 27 03:09:13 EDT 2006
Hi list,
I'm trying to use zope3 generations for the first time and I managed to
get a schema manager working that support the IInstallableSchemaManager
interface (it is just a subclass of SchemaManager).
So I have an install.py module with an evolve function and it is getting
called at zope startup. Actually it's called only the first time as it
should be.
This is how the little script looks like:
import transaction
from zope.app.folder.folder import Folder
def evolve(context):
"""Install initial basic data structure for the site"""
print 'Installing application'
root = context.connection.root()
root['my_folder'] = Folder()
transaction.commit()
The problem is that after zope is started, I go to the ZMI and I don't
see my new folder there.
The way I test this is:
1. Stop zope if it was running
2. Remove var/Data.fs and var/Data.fs.index
3. Start zope
that way my install script is called for sured since I'm running a brand
new database every time.
Anybody knows what am I doing wrong?
Thanks in advance
Lorenzo Gil
More information about the Zope3-users
mailing list