Mailing List Archive

[Zope-PTK] PTK defaults
I am trying to do something fairly simple w/ the PTK product (which is
really great!!)

I want members to be able to open their members directory w/ WEBDAV [.is it
me? or does ZOPE WEBDAV Server *not* let you READ from folders but I *can*
INSERT] and add contents (images and DTML Documents). The contents would
then be auto-indexed (preferably making the catalog sensitive to all DTML
Documents) when file is created.

Questions:
---------

* how can i make dtml documents automagically index when they are added via
WEBDAV? (is this possible? please give me general idea how to do this :)

* I then need to add a few properties to the dtml document (current_state,
reviewer, etc) - I would assume I would do this before I index it in the
previous step.

* can the SiteIndex be used to catalog anything outside News Item, Document,
Link? I tried to manually get it to find 'DTML Document's and it wouldnt -
how did you do that? does it only index a certain type?

* btw where are the base types for News Item, Document, Link? in
DemoPortal.zexp? where? this is my lack of ZClasses understand showing.

* is there any documentation on PTK? plans from d.c.?

* is PTK at 1.0? if not what do you 'think' will change before 1.0 is
released? (I'm writing some very high level documentation at the moment w/ a
tutorial-- wee stages right now)


thanks,
george runyan grunyan@emerging.com
Re: [Zope-PTK] PTK defaults [ In reply to ]
On Mon, 13 Mar 2000, George Runyan wrote:

> * how can i make dtml documents automagically index when they are added via
> WEBDAV? (is this possible? please give me general idea how to do this :)

Unfortunately, I know of no way. I do not think this would be a good
idea, in any case. The PTK will expect the objects it gets from the
catalog to be some sort of PortalContent object. It will try to use
methods on the object which will not exist for a DTML Document. You can
kill two birds with one stone by creating a ZClass that inherits from
PortalContent and DTML Document. You can also do this in Python, if you
don't like ZClasses.

> * I then need to add a few properties to the dtml document (current_state,
> reviewer, etc) - I would assume I would do this before I index it in the
> previous step.

You can add whatever properties you need to your new class or ZClass's
property sheets.

> * can the SiteIndex be used to catalog anything outside News Item, Document,
> Link? I tried to manually get it to find 'DTML Document's and it wouldnt -
> how did you do that? does it only index a certain type?

Yes, I don't know, and no.

I'm somewhat surprised it refused! What happened?

The catalog is a plain-jane ZCatalog for the most part. I have done
nothing special to it which would make it have requirements of the objects
it catalogs, at least, not intentionally. However, as I mentioned above,
the PTK does have expectations about the objects it gets out of the
catalog.


> * btw where are the base types for News Item, Document, Link? in
> DemoPortal.zexp? where? this is my lack of ZClasses understand showing.

Look in ZopePTK/PTKBase, at NetsItem.py, Document.py and
Link.py. They are not ZClasses.

> * is there any documentation on PTK? plans from d.c.?

There is some user level documentation online, which can be found at:

http://www.zope.org/Products/PTK/PTK.html

There is developer level documenation in ZopePTK/PTKBase/interfaces

> * is PTK at 1.0? if not what do you 'think' will change before 1.0 is
> released? (I'm writing some very high level documentation at the moment w/ a
> tutorial-- wee stages right now)

Not yet. The user object will be the most significant change. As
long as you are using the interfaces marked out in the 'interfaces'
folder, you'll be fine when that happens. Most of the changes will be
additional features.

Mike.

--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434
RE: [Zope-PTK] PTK defaults [ In reply to ]
you rock Mike.

as far is ZCatalog _not_ cataloging a certain 'meta_type':
yup- I just tried it again, if you add a DTML Document to a Members/runyaga
folder
and then goto SiteIndex FindItems tab I tried to find both All Documents,
and DTML Documet. When I click 'Find' it only shows meta_type = 'Document',
'Link', 'News Items'

thanks for the documentation link- could this be included in /Documentation
directory?

again - many thanks
george

-----Original Message-----
From: Mike Pelletier [mailto:mike@digicool.com]
Sent: Tuesday, March 14, 2000 12:26 PM
To: George Runyan
Cc: zope-ptk@zope.org
Subject: Re: [Zope-PTK] PTK defaults


On Mon, 13 Mar 2000, George Runyan wrote:

> * how can i make dtml documents automagically index when they are added
via
> WEBDAV? (is this possible? please give me general idea how to do this :)

Unfortunately, I know of no way. I do not think this would be a good
idea, in any case. The PTK will expect the objects it gets from the
catalog to be some sort of PortalContent object. It will try to use
methods on the object which will not exist for a DTML Document. You can
kill two birds with one stone by creating a ZClass that inherits from
PortalContent and DTML Document. You can also do this in Python, if you
don't like ZClasses.

> * I then need to add a few properties to the dtml document (current_state,
> reviewer, etc) - I would assume I would do this before I index it in the
> previous step.

You can add whatever properties you need to your new class or ZClass's
property sheets.

> * can the SiteIndex be used to catalog anything outside News Item,
Document,
> Link? I tried to manually get it to find 'DTML Document's and it wouldnt
-
> how did you do that? does it only index a certain type?

Yes, I don't know, and no.

I'm somewhat surprised it refused! What happened?

The catalog is a plain-jane ZCatalog for the most part. I have done
nothing special to it which would make it have requirements of the objects
it catalogs, at least, not intentionally. However, as I mentioned above,
the PTK does have expectations about the objects it gets out of the
catalog.


> * btw where are the base types for News Item, Document, Link? in
> DemoPortal.zexp? where? this is my lack of ZClasses understand showing.

Look in ZopePTK/PTKBase, at NetsItem.py, Document.py and
Link.py. They are not ZClasses.

> * is there any documentation on PTK? plans from d.c.?

There is some user level documentation online, which can be found at:

http://www.zope.org/Products/PTK/PTK.html

There is developer level documenation in ZopePTK/PTKBase/interfaces

> * is PTK at 1.0? if not what do you 'think' will change before 1.0 is
> released? (I'm writing some very high level documentation at the moment w/
a
> tutorial-- wee stages right now)

Not yet. The user object will be the most significant change. As
long as you are using the interfaces marked out in the 'interfaces'
folder, you'll be fine when that happens. Most of the changes will be
additional features.

Mike.

--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434
RE: [Zope-PTK] PTK defaults [ In reply to ]
On Tue, 14 Mar 2000, George Runyan wrote:

> you rock Mike.
>
> as far is ZCatalog _not_ cataloging a certain 'meta_type': yup- I just
> tried it again, if you add a DTML Document to a Members/runyaga folder
> and then goto SiteIndex FindItems tab I tried to find both All
> Documents, and DTML Documet. When I click 'Find' it only shows
> meta_type = 'Document', 'Link', 'News Items'

That's a pretty good trick! I wonder how I did it. I'm almost
inclined to call this a feature!

> thanks for the documentation link- could this be included in /Documentation
> directory?

Hmm... Maybe? Certainly when we put a bow on it and call it
one-point-oh, anyway.

Mike.

--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434