[ZODB-Dev] Accessing Plone through ZEO back door?
Christian Robottom Reis
kiko at async.com.br
Sat Aug 21 22:53:20 EDT 2004
On Sat, Aug 21, 2004 at 07:37:49PM -0400, Kirby Urner wrote:
>
> Let me see if I've got this straight: Zeo serves the ZODB using
> ClientStorage, but isn't aware of Products, which are at the Zope layer
> (and above). So the reason I get errors when doing
>
> >>> storage = ClientStorage.ClientStorage(('localhost',8100))
> >>> db = DB(storage)
> >>> conn = db.open()
> >>> root = conn.root()
> >>> app = root['Application']
> >>> app.reset()
>
> regarding no CMFPlone, has to do with Python via ZEO not knowing about
> Products, yes?
You're probably getting a traceback that complains about a module
loading (peeks below... right!). This happens because you need to have
local access to the modules that implement your Persistent classes --
and the ZODB isn't finding them where it's looking.
> Backing up, is it at all realistic to think about a programmatic back
> door into a Plone instance, like maybe doing some wxPython GUI thing
> that is aware of objects created through a Plone frontend? Is that a
> supported/encouraged design, or really perverse?
I don't see a problem with it (but I have nothing to do with Plone
either so take that with a grain of salt). We do `backdoors' as you say
like this in out desktop software, and it works quite well.
> I scoured the web for documentation regarding this question, but Zeo
> seems to be a moving target -- a lot of what I found re configuration
> and so on seemed to be rather dated. But if there's stuff I should have
> read about all this, I'd be happy for some URLs.
This isn't all ZEO-specific. You need to have local access to the
modules. Install them wherever you're opening the ZODB and you'll see
that indeed it works quite well.
> PS: I thought I might solve the whole issue by putting a path to my
> zope instance (/var/zope) in PYTHONPATH, but that didn't help.
That sounds odd. It *should* work --
> ImportError: No module named CMFPlone.Portal
was this module importable via the python interactive interpreter? If
not, it should!
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331
More information about the ZODB-Dev
mailing list