Skip to main content

Using the zope debug console

January 31, 2009

First off, go into your instance directory and issue a command like this,

./bin/instance debug

Things to Note

  • "app" is the zope root
  • You can access your Plone instances and other objects just by issuing the normal ways for traversing objects.  For instance,

Login as user

from AccessControl.SecurityManagement import newSecurityManager
user = app.acl_users.getUser(user_name_or_id)
newSecurityManager(None, user.__of__(app.acl_users))

Editing Objects

So what do you do if you want to edit objects and make the changes persist?  Pretty much just treat objects like you'd normal do in a python script.  Just when you're done, make sure you issue the following commands.

import transaction