[Zope-dev] RE: Catalog
Michel Pelletier
michel@digicool.com
Fri, 9 Jul 1999 13:31:50 -0400
> -----Original Message-----
> From: Jason Spisak [mailto:webmaster@mtear.com]
> Sent: Friday, July 09, 1999 2:25 PM
> To: Michel Pelletier
> Subject: Re: Catalog
>
>
> Michel,
>
> You use catalog_object. hat is the difference between that
> and manage_catalogObject?
>
manage_catalogObject wants a list of urls, which it then resolves itself
into objects (the object are needed by the indexes). When it resolved
the object, it then called catalog_object to catalog the actual object
with it's unique id (which in this case is the URL).
catalog_object needs only the object and the unique id, which is how we
used it here. It makes things simpler. manage_catalogObject is really
meant to be just a management interface to adding objects,
catalog_object is meant to be the external hook for objects to catalog
themselves.
-Michel
> Jason Spisak
> webmaster@mtear.com
>
> Michel Pelletier wrote:
> >
> > PS: jason@mtear.com, which is where you sent this message from, is
> > bouncing with a SMTP error of '553 no such user'
> >
> > > -----Original Message-----
> > > From: Jason Spisak [mailto:jason@mtear.com]
> > > Sent: Friday, July 09, 1999 9:43 AM
> > > To: michel@digicool.com
> > > Subject: Re: Catalog
> > >
> > >
> > > Michel,
> > >
> > > Thanks for the suggestion.
> > >
> > > I tried the blah namespace force, but I got this traceback
> >
> > Hmm.. Ok I looked deeper into our Portal Stuff, but it's a
> but complex.
> > basicly we have a Findable class with the following external method:
> >
> > def index_object(self):
> > """A common method to allow Findables to index themselves."""
> > try: self.SiteIndex.catalog_object(self, self.url())
> > except: pass
> >
> > (our catalog is called SiteIndex)
> >
> > Then, in the constructor for your ZClass (making sure your ZClass
> > subclasses the Findable base ZClass; in this example it's a
> NewsItem)
> > Use the 'index_object'
> >
> > Note that we use SiteIndex and index_object in our
> examples, but these
> > are holdovers. You should use Catalog and index_object, the more
> > generic terminology.
> >
> > <!--#var standard_html_header-->
> >
> > <!--#with "NewsItem.createInObjectManager(REQUEST['id'],
> REQUEST)"-->
> >
> > <!--#call "propertysheets.Findables.manage_changeProperties(
> > REQUEST)"-->
> > <!--#call "propertysheets.Basic.manage_changeProperties(
> > REQUEST)"-->
> >
> > <!--#call index_object-->
> >
> > <!--#/with-->
> >
> > <!--#call "RESPONSE.redirect(
> > URL2+'/manage_main')"-->
> >
> > <!--#var standard_html_footer-->
> >
> > -Michel
>
> --
> Jason Spisak
> Director Implementation/Development
> Masterson, Tate & Associates
> 6151 West Century Boulevard #928
> Los Angeles, CA 90045
> http://www.mtear.com
>