[Zope] Simple ZODB Search and Edit
zopelist at betabug.ch
Wed Apr 11 03:34:43 EDT 2007
(Tue, Apr 10, 2007 at 11:01:39AM +0200) Peppe Top wrote/schrieb/egrapse:
> I'm new to Zope and I'm reading through a few tutorials
> and the Zope book. I need to do a text string search on
> a ZODB and I need to know which objects contain the string.
> Example: I have a site running up, and I need to know
> where my mail is mentioned, so I can edit each object
> and update the mail. (I think using ZMI)
Go to the Root Folder in the ZMI, click on the "Find" tab. Enter
whatever data you have and click on "Find".
> >From the documentation I think that ZCatalog might do
> the trick, but I'm not sure it's the easier solution.
> Am I on the right path?
I don't think so, but it largely depends on what you are really trying
> Can you get me started?
To get started please read:
If you want to build your own application with Zope, you should build
your own products that will hold the presentation and "business logic".
The instances of those products will be stored in the ZODB and those
will contain the content of your application. As someone else already
mentioned you can make your content searchable with very little work, by
using a ZCatalog and a minimal amount of extra code in your products.
> I just need a fixed string search, returning the name
> (maybe the path too) of the object inside the ZODB, so
> I can later edit.
> Is ZMI the right tool to do simple editing?
No. The ZMI is an administrative interface. It's not meant to build end
user interfaces upon it.
> Also is ZCatalog already included in Zope, or do I need
> to install it?
Sure it's in there. You can see it as "ZCatalog" from the ZMI "Add" menu
in the upper right corner.
Another thought: *If* you are trying to build a content management
system, maybe you should consider starting out with one of the existing
ones that run on Zope? Configuring / extending that to your needs? They
usually come with full text search out of the box - and they already
know how to handle all those little pitfalls you will encounter.
More information about the Zope