Re: [Zope] ZCatalog key error

2000-08-16 Thread Chris McDonough

Yeah, it's running 2.2.1b1 and it's still hosed.  :-(  When Ethan gets
back from LinuxWorld, I'm going to try to have him update to the latest
CVS and see if we can pin the problem down.

I added logging code to the catalog that was *supposed* to make it
easier to track down why these keyerrors were happening.  However, I
muffed it and the current Zope 2.2.1b1 release logs errors on all
fieldindex uncatalog_object calls (no matter if there's a problem or
not).  That particular problem is fixed in CVS.

We need to get a chance to examine the error output from index-unindex
functions to see exactly what's going on with the catalog.  I
desperately need to fix this problem for reasons unrelated to zope.org. 
If anyone is running a current CVS checkout of the Zope 2.2 branch, and
they're having KeyErrors, if you can send me relevant sections of your
stupid_log_file, I'd be grateful.  Maybe I can establish a pattern.  But
please don't send me log files with hundreds of unindex_object calls ala
Zope 2.2.1b1, it needs to be the latest CVS checkout on the 2.2 branch.

"Bak @ kedai" wrote:
> 
> is Zope.org running 2.2.1b1 or CVS?  cause i think key error still occurs.
> check out 'What's New' at Zope.org, and you'll get the error.
> 
> i might be wrong though
> thanks
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] upgrade 2.2.0 to 2.2.1b1

2000-08-16 Thread Chris McDonough

The couldn't load state errors are probably from a product not getting
initialized properly.  If you set up your STUPID_LOG_FILE environment
variable and point it at a file before starting Zope (if you haven't
already), you may be able to see a failed product init before the state
errors, which would give you a clue.  That said, from your description,
it's probably kmnetnews that's not getting inited properly.  I haven't
seen  Kevin Dangoor around lately, I wonder if he's still maintaining
it.

"Bak @ kedai" wrote:
> 
> hello all
> 
> has anybody encountered problems when upgrading from 2.2.0 to 2.2.1b1?  i
> have problems with some products (kmnetnews), and some of my ZClasses.  are
> there any known issues?  things i should have considered?
> 
> there are also tracebacks "Couldn't load state" when starting zope in debug
> mode..
> 
> platform
> RH6.2, straight ZServer
> products - KMnetnews, a few ZClasses,
> 
> thanks
> 
> --traceback when i tried accessing kmnetnews--
> 
> Zope Error
> 
> Zope has encountered an error while publishing this resource.
> 
> TypeError
> 
> Sorry, a Zope error occurred.
> 
> Traceback (innermost last):
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
> line 222, in publish_module
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
> line 187, in publish
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/Zope/__init__.py, line
> 221, in zpublisher_exception_hook
> (Object: Traversable)
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
> line 171, in publish
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/mapply.py,
> line 160, in mapply
> (Object: index_html)
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
> line 112, in call_object
> (Object: index_html)
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/OFS/DTMLDocument.py,
> line 171, in __call__
> (Object: index_html)
>   File
> /home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_String.py, line
> 502, in __call__
> (Object: index_html)
>   File
> /home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_With.py, line 146,
> in render
> (Object: Data)
>   File
> /home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_Util.py, line 337,
> in eval
> (Object: index_html(_.None, _, category='top'))
> (Info: _)
>   File , line 0, in ?
> TypeError: call of non-function (type None)
> 
> end tracebacks 
> 
> --tracebacks starting zope--
> --
> 2000-08-17T03:53:37 ERROR(200) ZODB Couldn't load state for
> '\000\000\000\000\000\000\000Z'
> Traceback (innermost last):
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 447,
> in setstate
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 213,
> in _persistent_load
> (Info: 8÷)
>   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 154,
> in __getitem__
> ---data snipped---
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZCatalog key error

2000-08-16 Thread Bak @ kedai

is Zope.org running 2.2.1b1 or CVS?  cause i think key error still occurs.  
check out 'What's New' at Zope.org, and you'll get the error.

i might be wrong though
thanks

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] upgrade 2.2.0 to 2.2.1b1

2000-08-16 Thread Bak @ kedai

hello all

has anybody encountered problems when upgrading from 2.2.0 to 2.2.1b1?  i 
have problems with some products (kmnetnews), and some of my ZClasses.  are 
there any known issues?  things i should have considered?


there are also tracebacks "Couldn't load state" when starting zope in debug 
mode..


platform
RH6.2, straight ZServer
products - KMnetnews, a few ZClasses, 

thanks

--traceback when i tried accessing kmnetnews--
 
Zope Error

Zope has encountered an error while publishing this resource. 

TypeError

Sorry, a Zope error occurred.

Traceback (innermost last):
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, 
line 222, in publish_module
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, 
line 187, in publish
  File /home/kdie/Zope-2.2.1b1-src/lib/python/Zope/__init__.py, line 
221, in zpublisher_exception_hook
(Object: Traversable)
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, 
line 171, in publish
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/mapply.py, 
line 160, in mapply
(Object: index_html)
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, 
line 112, in call_object
(Object: index_html)
  File /home/kdie/Zope-2.2.1b1-src/lib/python/OFS/DTMLDocument.py, 
line 171, in __call__
(Object: index_html)
  File 
/home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_String.py, line 
502, in __call__
(Object: index_html)
  File 
/home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_With.py, line 146, 
in render
(Object: Data)
  File 
/home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_Util.py, line 337, 
in eval
(Object: index_html(_.None, _, category='top'))
(Info: _)
  File , line 0, in ?
TypeError: call of non-function (type None)

end tracebacks 

--tracebacks starting zope--
--
2000-08-17T03:53:37 ERROR(200) ZODB Couldn't load state for 
'\000\000\000\000\000\000\000Z'
Traceback (innermost last):
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 447, 
in setstate
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 213, 
in _persistent_load
(Info: 8÷)
  File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 154, 
in __getitem__
---data snipped---

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] third party hosting options wihtout long running process

2000-08-16 Thread Bob Horvath

Hi all,

I hope this hasn't been asked to death before, but out of lots of
related information that I did find, I could not find a direct
answer to my question.

I have been using and really enjoying Zope on my Debian system at
home, but would like to start using it for a couple of web sites
that I maintain.  The problem is, they are hosted at providers
that do not have Zope, and currently have no plans to do it. Both
of the providers allow pretty much any CGI you can write, except
that they don't allow long runing processes.

Where does this leave me?

I have seen where Zope can be run as a CGI, but is unbearably
slow.  Is unbearable truly unbearable?

I have gleaned that they are several parts of Zope, not all of
which needs to be used.  In particular, so far I have really
gotten into the acquisition concept, as it is similar to something
I was already doing with python CGIs and heavy abuse of soft
links.  Can just ZPublisher (this is what does this right?), be
run as a CGI?

Of course, my other option is to move my sites.  I have a freezope
account at nipltd, but I assuming they don't want people doing
redirections ala redirection.net to freezope accounts.  I have
seen other hosting companies, but most seemed rather expensive,
especially in light that I would not be giving up my current ISP
for a couple of unrelated to Zope reasons.

Basixally, if I am limited to CGI, what parts of Zope can I use
effectively?


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] modifying/changing DTML properties

2000-08-16 Thread R. David Murray

On Wed, 16 Aug 2000, Paul Schreiber wrote:
> --- "R. David Murray" <[EMAIL PROTECTED]> wrote:
> > On Wed, 16 Aug 2000, Paul Schreiber wrote:
> > > > 
> > 
> > 
> 
> This:
>   
>   
> 
>   
> 
> results in:
>green
> 
>green
> 
> did i miss something?

Hmm.  That should have worked.  You could try
manage_changeProperties(eggs='blue') as an alternative, but the
dictionary way should have worked.

Did you check the property after the method had executed?  Perhaps
the change is not visible until the method completes, although I
would not expect that to be the case...unless 'eggs' exists "closer"
in the name space stack as a variable than it does as a property
on the object, in which case the second dtml-var would be picking
up the variable value but the manage_changeProperties will have
affected property of the object it was called on.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Best way to subclass DTML Document and some other ZClassesquestions

2000-08-16 Thread R. David Murray

On Wed, 16 Aug 2000, Marcin Kasperski wrote:
> > Pass it as an argument to the call that creates the DTML Document.
> 
> How? 
> Currently my constructor method contains
> the following (mk_dtml_document is my custom class which subclasses DTML
> Document, Extra is the name of my custom propertysheet):
> 
>  "mk_dtml_document.createInObjectManager(REQUEST['id'],REQUEST)">

Hmm.  I've only done this kind of thing by calling the add method of
the class, where you could pass in, say, title=title.  I'm not
sure how you'd do it with createInObjectManager.  Although you
might try wrapping the whole thing in .  The
REQUEST title may be getting overridden by another title property
that happens to be blank.

> > Yep.  You should be able to replicate everything the original
> > constructor code does in your own code.  Read The Source, Luke .
> 
> I hate replicating code. I love calling it. Couldn't it be done this
> way?

Maybe.  You'd have to look at the source code and see if can handle being
called as a subroutine.  If not, somebody ought to refactor it .

> I tried defining DTML Method with name PrincipiaSearchSource and
> contents
> 
> 
> 
> (body is my custom property name).
> Next I clicked 'Update Catalog' in ZCatalog screen. Seems my attempt has
> been ignored - the amount of objects indexed via PrincipiaSearchSource
> (according to ZCatalog status screen) has not changed (those object are
> succesfully indexed on title etc).

As someone else said, the method has to be parameterless (yours
probably appears to be).  This also means that it can't depend on
having a name space around (that usually gets passed implicitly to
dtml methods), including REQUEST, since Catalog won't have that to
pass it in most indexing scenarios.

At first glance I'd think your code would work, but I can think of
two other things you could try:  , and defining
an external method instead and just have it just do "return
self.body".

> > > 5) Can I write index_html method of my custom class so it interpret DTML
> > > tags (like dtml-var substitution)?
> > 
> > I'm sure you can, but I don't know how .  But if you are doing
> > that, why not just subclass DTML-Method (or document)?
> 
> Because I have not done it previously and now I have about 100 objects
> of this type and do not know how to perform such a change.

Ah, yes, changing the base class of a ZClass is hard.  There's a
hold-onto-your-pants recipie for doing it, but it's not for the faint
of heart.  Check the HowTo's if you are curious.

Depending on the complexity of the objects, you could write an
external method that would write the data out to a file in some format,
and another to read the data back in and use it to instantiate
new objects of the desired type.  I did this once with a 60K
database of objects .  I *could* send you that source code
as an example, if you want.  I based the re-load code on the
"adding ZClass object programatically" howto.

> > Write an external method to do all the object creation, property
> > copying, and old object deletion.
> 
> What about some sample code?

I haven't done it myself, so I don't have any sample code for
this (but see above).

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Best way to subclass DTML Document and some other ZClasses questions

2000-08-16 Thread R. David Murray

On Wed, 16 Aug 2000, Marcin Kasperski wrote:
>  REQUEST)">
> 
>   
>How can I change original title? 
>   
> 
> 
> 
> On which object (which property sheet) should I call
> manage_editProperties to change document title?

I believe the title goes in the 'default' property sheet, but more
than that I can't tell you.  'default' gets some special handling
I think, but you could certainly try just using it in place of
Extra in the call up there.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZOracleDA problem

2000-08-16 Thread Chris Beaumont

Hello,

Ive successfully compiled the DCOracle package and then moved the
compiled modules to the DCOracle directory of ZOracleDA, and now the DA
shows up as non-broken in my Zope installation..

However, when I try to add a ZOracleDA connection object to my Zope
website, I get a "this document contained no data" page... back.. it
wont work.
DCOracle passed the connection test so I know it isnt that..  Does
anyone have any idea what I might be doing wrong?

I'm using Zope 2.16


Thank you

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Referencing an object in a subfolder

2000-08-16 Thread Chris Withers


"Smith, Paul" wrote:
> 
> I want to create an "images" directory for a web site and store image objects there 
>that I can reference. How do I get a DTML document in a higher directory to see the 
>images folder and locate the appropriate image?


 


cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Can't change user roles without password

2000-08-16 Thread Andy McKay

The differentiating factor is the version. This was an issue in 2.1.6.
Upgrade time :)

--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "David Riggs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 2:20 PM
Subject: [Zope] Can't change user roles without password


> Somewhere along the way, the acl_users/Contents form has decided to quit
>
> filling in the value of each user's password, so that their roles can
> only be
> assigned if a Manager knows their password...I've got new installation
> running
> Zope 2.2.0 and a new CVS PTK release on another box that does it
> correctly, but
> I can't determine what's the differentiating factor by comparing them.
>
> Any ideas on what I did to cause this, or more importantly, what I can
> do to
> fix it?
>
> I'm using...
> Zope 2.1.6 (binary release, python 1.5.2, win32-x86)
> PTK 0.7.1
> WinNT 4.0 SP5
>
> Thanks,
> Dave.
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie Q from non-Newbie: Where does my HTML go?

2000-08-16 Thread J. Atwood

Dead on balls accurate. Works like a charm.

Thanks Chris.

(now have to figure out why I couldn't figure that out!) :)

J

> From: Chris Withers <[EMAIL PROTECTED]>
> Organization: New Information Paradigms
> Date: Wed, 16 Aug 2000 23:17:01 +0100
> To: "J. Atwood" <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope] Newbie Q from non-Newbie: Where does my HTML go?
> 
> "J. Atwood" wrote:
>> EX1:
>> 
>> 
> 
> untested...
> 
> 
> 
> cheers,
> 
> Chris
> 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie Q from non-Newbie: Where does my HTML go?

2000-08-16 Thread Chris Withers

"J. Atwood" wrote:
> EX1:
> 
> 

untested...



cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Meet Paul Everitt at the Paris Zope Meeting !

2000-08-16 Thread Maik Roeder

Hi everyone !

The Paris Zope Meeting is a great opportunity for Europe's Zope community
to meet Paul Everitt, CEO of Digital Creations,  who is currently in France
for holidays. It is also a chance to meet Zope developers from England,
Germany, Switzerland and of course France.

If you want to come to the event, please send a mail to [EMAIL PROTECTED]
to let us know about your plans. Maybe some of us can already gather a day
or two before the event ?

A list of people who have already registered is available here:
http://portalux.com/nnl/documents/zope-meeting/list

Event Details:

Date: Wednesday August 23rd 2000
Schedule: From 09:00 to 18:00 CET
Place: 18, rue du Faubourg du Temple - 75011 Paris

Registration: http://portalux.com/nnl/documents/zope-meeting/
WebSite:  http://zdp.zope.org/projects/eurozope/events/pariszopemeeting
Mailing List: http://comlounge.net/mailman/listinfo/eurozope 

There are some talks planned, but due to the short preparation time,
these are not fixed (yet). Maybe you can give a talk as well ? Just let
us know.

This is the first event organized by the EuroZope initiative, which
tries to better support Zope in Europe due to the great response we
received at the Linuxtag 2000 in Stuttgart. EuroZope infos:

http://zdp.zope.org/projects/eurozope

Maybe you want to attend some of the other events planned by the EuroZope
team ?

http://zdp.zope.org/projects/eurozope/events

We still need Zopers who would like to help us organizing those
future events. Let's discuss it on the EuroZope mailing list:

http://comlounge.net/mailman/listinfo/eurozope

Greetings,

Maik Röder

-- 
"The computing future is based  on "cyberbodies" - self-contained, 
neatly-ordered,  beautifully-laid-out  collections of information, 
like immaculate giant gardens." The second coming - A manifesto. David
Gelernter http://www.edge.org/3rd_culture/gelernter/gelernter_p1.html

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] The mysteries of Product icons ?????

2000-08-16 Thread Chris Withers

Daniel Rusch wrote:
> Can anyone out there demystify this for me???

Browser caching perhaps?

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Reloading file objects?

2000-08-16 Thread Dieter Maurer

Peter Arvidsson writes:
 > That just work for documents. It is not possible to set any headers for
 > pdf-files, is it? I tried to put that in the document I call the
 > pdf-file from but that didnt work.
The following DTML method (view) adds a header to a file/image:




The "><" at the start of the second line may be necessary to
prevent spurious whitespace before the image.
Almost surely (not tested), you can use alternatively


Expires: 




This uses Zope's CGI compatibility: the body of a response
generated by a DTML method (or document) may be preceeded
by a sequence of HTTP headers separated from the body by
a single blank line.


You would use this method in URLs in the following way:

/view


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Best way to subclass DTML Document and some other ZClasses questions

2000-08-16 Thread Dieter Maurer

Marcin Kasperski writes:
 > >  > 1) How can I set standard DTML Document properties (title!) from my
 > >  > constructor? I created constructor form and constructor method, I
 > >  > succesfully prompt for and set all my properties but I do not know how
 > >  > to set properties belonging to DTML Document.
 > > Your ZClass inherits the methods of its base classes.
 > > You use the base classes methods to access their features.
 > > 
 > > In your specific case, you would use "manage_changeProperties"
 > > to change the DTML Document properties.
 > > "manage_changeProperties" is defined by "OFS.PropertyManager.PropertyManager".
 > 
 > What exactly should I write? 
 > On which object (which property sheet) should I call
 > manage_editProperties to change document title?
On the object you want the title changed 

Okay, let's admit: I am a bit confused.

  Above, I understood that your class derives from DTML Document.
  Then each instance of your class is an instance of DTML Document, too.
  You use the inherited methods in the same way you use the methods
  defined in your class.
  I.e. 


   


  What confuses me: below your custom class does not seem to
  be derived from DTML Document.


 > >  > 2) Can I do anything to have single property screen which would behave
 > >  > as original DTML Document property screen but present both original
 > >  > properties and properties belonging to my custom property sheet?
 > > You can create your own ZClass "view" that does this.
 > 
 > So it is impossible to use original DTML Document property screen? I
 > like it.
You can use the source and extend it (slightly).


 > >  > 4) Can I do something to have ZCatalog PrincipiaSearch (i.e. full text
 > >  > search) to scan some property of my custom ZClass (say property body
 > >  > from propertysheet Basic)?
 > > You just define "Meta Data" or indexes for them.
 > 
 > Not exactly. I would like to have bodies of my DTML Documents and my
 > custom class (which does not subclass DTML Document) .body property
 > contents to be indexed with _the same_ full text index.
What should this "the same" mean?

 > I tried defining method PrincipiaSearchSource in my custom class but it
 > did not helped (ZCatalog did not indexed my objects in PrincipiaSearch
 > index - according to its status screen).
Any parameterless method (or any attribute) should work.

Maybe, your methods throws an exception. Then, it will not contribute
to the indexing. Test it in isolation.
 

 > >  > 5) Can I write index_html method of my custom class so it interpret DTML
 > >  > tags (like dtml-var substitution)?
 > > I do not understand this question:
 > > 
 > >   "index_html" has nothing to do with interpreting DTML tags.
 > 
 > Yes I know. In fact I ask 'what can I do to parse DTML in a method of
 > object which does not subclass DTML Document?'
 > 
 > >   When you want to interpret DTML tags, you will need to somehow
 > >   use DocumentTemplate instances.
 > 
 > And that 'somehow' is what I am asking for.
You either use the Zope wrapped Document Template objects
(DTML method/document) or you use the DocumentTemplate
directly in Python (external method, product, maybe Python method).

The DTML user guide contains a chapter on how to use Document Template
from Python.

 
 > The archives are not searchable :-(
You look at the wrong archives.

NIP archives the main Zope mailing lists.
*These* archives *are* searchable.



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] __call__ error message - I gave up

2000-08-16 Thread Dieter Maurer

cuiod-tec Jens Gelhaar writes:
 > What I like to do is pretty simple, but I don't get it. The following code
 > snippet is simple and what I want to is straightforward:
 > 
 > 
 >   
 > 
 > 
 > All DTML Documents in a Folder should be put together in one document. It
 > works fine, if there is no reference to another object. But when I put
 > something like
 >  in one of this DTML Document I get the appended error
 > message.
 > 
 > Any Idea
 > 
 > Jens
 > 
 > 
 > Error Type: AttributeError
 > Error Value: __call__
This is the acquisition bug, I analysed about 1 month ago.

It might be fixed in 2.1.1b1; I am not sure, however.

Until the bug is fixed, I would try to avoid DTML documents
and stay with DTML methods.



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] HOWTO (but to be improved) - linking to neighbours

2000-08-16 Thread Dieter Maurer

Marcin Kasperski writes:
 > * Problem 
 > 
 > The problem: while presenting some page, I would like to automagically
 > add links to 'previous' and 'next' page in the same directory. Say you
 > organize a bunch of HOWTOS and you would like to let the people navigate
 > via 'next' links - without going back go table of contents.
You could use:


   




Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] intermittent problems downloading portal files

2000-08-16 Thread Dieter Maurer

Lucas Hofman writes:
 > We use PTK as an intranet for a R&D company. Users publish their reports
 > as in PDF format using portal file object type. 
 > 
 > Now and then (enough to be irritating, but not reproducable on demand)
 > the PDF file gets corrupted in the download, resulting in the reader
 > complaining (typically "file does not start with %PDF...")
 > 
 > The server runs linux (mandrake 7), Zserver2.1.6, Zope 2.1.6 and PTK
 > 0.7.1
 > The clients are heterogenous, IE5, Netscape 4.x on both PC and
 > workstations.
This almost surely is the "Missing Thread Synchronization Bug".
I reported it several month ago (to the list and the collector).

The problem is fixed in Zope 2.2.

My collector report contains a patch for Zope 2.1.6, though
not an optimal one.



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Managing subobjects

2000-08-16 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
 > I created a ZClass, zRow.  This class can contain other ZClass: zField_Text,
 > zField_Date, etc.
 > This let me define the columns contained in a zRow.
 > I then defined a Class zTable, wich contains zRows.
 > 
 > Question:
 > 
 >  -  In my manage tabs, I needed a have a tab "Define columns".  Do
 > achieve this, I inserted a ZRow Instace (with id Definition) in my zTable
 > product definition, and a method called Define_Columns, containing:
 > 
 > 
 >   
 > 
 > 
 >  And I defined a view "Define Columns" pointing to that method.  When
 > i click on the "Define Columns", I can see the manage screen of the instance
 > "Definition", that's what I wantwd.
 > 
 >  But when Add a zField, the instance is create in the zTable level,
 > not IN Definition instance!  All the classes are Based on CatalogAware,
 > ObjectManager.
There are 2 hierarchies, the object hierarchy in Zope
and the URL hierarchy used by the browser.

Usually, these two hierarchies are magically in sync.
However, it is easy to change this.

In your case:
  the "with Definition" changes (in some way) the current location in
  Zope's object hiararchy. However, the current location
  in the URL hierarchy is not changed.

  When you press "add", an HTTP request is generated, almost
  surely with a relative URL, i.e. relative to the current
  location in the URL hierarchy.

  Obviously, your add method is called in the wrong context
  (or maybe, the add method of the wrong object is called).

  You may succeed, when you change the location in the
  URL hierarchy, too.
  You do this with a "RESPONSE.setBase(newBase)".


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Import classes in External method

2000-08-16 Thread Dieter Maurer

Francois-Regis CHALAOUX writes:
 > How to import classes in an External method?
 > 
 > I mean, where to place the module where my class is defined. I tried to put it
 > in "lib/python/" or "Zope-2-2-0/lib/python/Shared", or in
 > "/usr/lib/python1.5/" but I always got the same message : 
 > 
 > 
 > The errror
 > ===
 > 
 > Error Type: SystemError
 > Error Value: Failed to import class myclass from module __main__ 

Strange!
When you place your module in "lib/python" (or any other
directory listed in PYTHONPATH), then "import module"
should work.

When you place it in "lib/python/Shared", you need
"from Shared import module".


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] HTTP_ACCEPT

2000-08-16 Thread Dieter Maurer

Spicklemire, Jerry writes:
 > There is a value included in "REQUEST" called HTTP_ACCEPT. 
 > Is there a way within Zope to reset this value? 


 > The default seems to be "*/*", but our sysadmin says Zope 
 > would get along better if we can change it to include the 
 > alias that Zope has been assigned by our Proxy Server.
I doubt, it will work as you want.

As far as I know, Zope by itself does not interpret "HTTP_ACCEPT".



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] EventLogManager1.0

2000-08-16 Thread Chris McDonough

They can.  :-)

> -Original Message-
> From: Dan L. Pierson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 16, 2000 3:38 PM
> To: Chris McDonough
> Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> Subject: [Zope] EventLogManager1.0
> 
> 
> Chris McDonough writes:
>  > Folks,
>  > 
>  > Available at 
> http://www.zope.org/Members/mcdonc/Products/EventLogManager
>  > is my attempt to write a somewhat smarter logging facility 
> for Zope.  It
>  > supports complex rules processing and configurable targets 
> (syslog and
>  > file).  It's been tested under Linux only but should work 
> on Win32 and
>  > other UNIX derivatives.  Give it a roll.
> 
> Looks very useful.  It would be even better if rules could associated
> with each target.  This would make it easy to separate, say, 
> debugging 
> logs from site statistics.
> 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Newbie Q from non-Newbie: Where does my HTML go?

2000-08-16 Thread J. Atwood

Why does EX1 return the raw text (and shows the html) and the second returns
the html (nicely) into the page?

EX1:




EX2:






Better way to do EX1?

Thanks,
J


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] modifying/changing DTML properties

2000-08-16 Thread R. David Murray

On Wed, 16 Aug 2000, Paul Schreiber wrote:
> > 



--RDM



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Can't change user roles without password

2000-08-16 Thread David Riggs

Somewhere along the way, the acl_users/Contents form has decided to quit

filling in the value of each user's password, so that their roles can
only be
assigned if a Manager knows their password...I've got new installation
running
Zope 2.2.0 and a new CVS PTK release on another box that does it
correctly, but
I can't determine what's the differentiating factor by comparing them.

Any ideas on what I did to cause this, or more importantly, what I can
do to
fix it?

I'm using...
Zope 2.1.6 (binary release, python 1.5.2, win32-x86)
PTK 0.7.1
WinNT 4.0 SP5

Thanks,
Dave.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Referencing an object in a subfolder

2000-08-16 Thread Smith, Paul

I want to create an "images" directory for a web site and store image objects there 
that I can reference. How do I get a DTML document in a higher directory to see the 
images folder and locate the appropriate image?

...Paul


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] EventLogManager1.0

2000-08-16 Thread Dan L. Pierson

Chris McDonough writes:
 > Folks,
 > 
 > Available at http://www.zope.org/Members/mcdonc/Products/EventLogManager
 > is my attempt to write a somewhat smarter logging facility for Zope.  It
 > supports complex rules processing and configurable targets (syslog and
 > file).  It's been tested under Linux only but should work on Win32 and
 > other UNIX derivatives.  Give it a roll.

Looks very useful.  It would be even better if rules could associated
with each target.  This would make it easy to separate, say, debugging 
logs from site statistics.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] modifying/changing DTML properties

2000-08-16 Thread Paul Schreiber

--- Rik Hoekstra <[EMAIL PROTECTED]> wrote:
>
> Paul Schreiber wrote:
>
> >- I have a folder in my zope tree called spam. 
> >- spam has one document called "foo"
> >- spam has a property called "eggs" which is set to "green"
> >
> >foo looks like this:
> >  hello
> >   ( &dtml-eggs; )
> >
> >I want to be able to change the value of eggs to, say, "blue" like so:
> >  
> >  
> 
> 
> 
> 

I tried that, and received the following error:

Zope Error

Zope has encountered an error while publishing this resource. 

Error Type: TypeError
Error Value: too many arguments; expected 2, got 3

any suggestions?

Paul

=
shad 96c / 4A CS / mac activist / eda / fumbler
fan of / jewel / sophie b. / sarah slean / steve poltz / emm gryner /
   / x-files / buffy / dawson's creek / habs / bills / 49ers /

 t h i n k  d i f f e r e n t.

__
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] modifying/changing DTML properties

2000-08-16 Thread Rik Hoekstra


first: consider changing to the 'new' dtml syntax


>- I have a folder in my zope tree called spam. 
>- spam has one document called "foo"
>- spam has a property called "eggs" which is set to "green"
>
>foo looks like this:
>  hello
>   ( &dtml-eggs; )
>
>I want to be able to change the value of eggs to, say, "blue" like so:
>  
>  





>  
>  eggs is now 
>
>how do I do this?
>
>I am running Zope 2.1.6 under debian linux.


this is platform independent

hth

Rik


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] I think, it is a bug in acquisition

2000-08-16 Thread Rik Hoekstra





>Maybe I have found a situation, where images are not working or rather
>acquisition.
>For example, you create 2 documents and one image
>  doc1  (DTML Document)
> contents: "document 1 
>  doc2  (DTML Document)
> contents: "document 2 
>  image (Image)
> contents: image
>When you put everything in one folder and try to render doc1, everything
>works fine. You get your image at the end. But if you put doc1 in a folder
>below like
>  doc2
>  image
>  subfolder
>doc1
>you get the appended error.

>When you remove the image call from doc2
>everything works again.

You're probably right about this, or my Zen has left me. I did some testing
and it will work allright if you move doc2 to the subfolder. i wonder if it
is an acquisition bug, though, as it seems to work with other objects in the
same setup. Could this be an Image bug?

>I checked this with JPicture - the same. Beside,
>today I posted another mail with "[Zope] __call__ error message - I gave
>up". In this situation I thought my coding was wrong because I wanted to
>list all documents with
>
>
>
>

try (untested)


  


the object items returns you a tuple with (id, ). Are you sure you
want that - it won't show on the html page

perhaps


  



or


  


will bring you more luck

>Any Help?
>

hth

Rik



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] The mysteries of Product icons ?????

2000-08-16 Thread Martijn Pieters

On Wed, Aug 16, 2000 at 02:08:47PM -0500, Daniel Rusch wrote:
> I made an icon form my new product, Zope loaded it correctly.
> 
> Then someone had the brilliant idea to change it. I can not figure out
> how to get Zope to load the new icon. I have deleted the product from
> Product Management at /Control_Panel / Products, rm the *.pyc files,
> bounced Zope, but it still hangs on to the old icon.
> 
> Can anyone out there demystify this for me???

Zope reads images for Python Product icons from disk at startup, it
doesn't store them persistently though. However, many browsers cache them
agressively. Did you do a force-reload?

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] modifying/changing DTML properties

2000-08-16 Thread Paul Schreiber

- I have a folder in my zope tree called spam. 
- spam has one document called "foo"
- spam has a property called "eggs" which is set to "green"

foo looks like this:
  hello
   ( &dtml-eggs; )

I want to be able to change the value of eggs to, say, "blue" like so:
  
  
  
  eggs is now 

how do I do this?

I am running Zope 2.1.6 under debian linux.


Paul

=
shad 96c / 4A CS / mac activist / eda / fumbler
fan of / jewel / sophie b. / sarah slean / steve poltz / emm gryner /
   / x-files / buffy / dawson's creek / habs / bills / 49ers /

 t h i n k  d i f f e r e n t.

__
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] The mysteries of Product icons ?????

2000-08-16 Thread R. David Murray

On Wed, 16 Aug 2000, Daniel Rusch wrote:
> Then someone had the brilliant idea to change it. I can not figure out
> how to get Zope to load the new icon. I have deleted the product from
> Product Management at /Control_Panel / Products, rm the *.pyc files,
> bounced Zope, but it still hangs on to the old icon.
> 
> Can anyone out there demystify this for me???

Browser caching?

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] class name of current object

2000-08-16 Thread Scott Shepherd

Is there a way to get the current object's class name?



doesn't work.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] I think, it is a bug in acquisition

2000-08-16 Thread cuiod-tec Jens Gelhaar

Maybe I have found a situation, where images are not working or rather
acquisition.
For example, you create 2 documents and one image
  doc1  (DTML Document)
 contents: "document 1 
  doc2  (DTML Document)
 contents: "document 2 
  image (Image)
 contents: image
When you put everything in one folder and try to render doc1, everything
works fine. You get your image at the end. But if you put doc1 in a folder
below like
  doc2
  image
  subfolder
doc1
you get the appended error. When you remove the image call from doc2
everything works again. I checked this with JPicture - the same. Beside,
today I posted another mail with "[Zope] __call__ error message - I gave
up". In this situation I thought my coding was wrong because I wanted to
list all documents with




Any Help?

Jens

Error Type: AttributeError
Error Value: __call__




Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the HTML
source for this page.

If the error persists please contact the site maintainer. Thank you for your
patience.


Traceback (innermost last):
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File E:\Programme\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File E:\Programme\WebSite\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: doc1)
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: doc1)
  File E:\Programme\WebSite\lib\python\OFS\DTMLDocument.py, line 171, in
__call__
(Object: doc1)
  File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
(Object: doc1)
  File E:\Programme\WebSite\lib\python\OFS\DTMLDocument.py, line 167, in
__call__
(Object: doc2)
  File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
(Object: doc2)
AttributeError: (see above)




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] EventLogManager1.0

2000-08-16 Thread Chris McDonough

Folks,

Available at http://www.zope.org/Members/mcdonc/Products/EventLogManager
is my attempt to write a somewhat smarter logging facility for Zope.  It
supports complex rules processing and configurable targets (syslog and
file).  It's been tested under Linux only but should work on Win32 and
other UNIX derivatives.  Give it a roll.

Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] The mysteries of Product icons ?????

2000-08-16 Thread Daniel Rusch

I made an icon form my new product, Zope loaded it correctly.

Then someone had the brilliant idea to change it. I can not figure out
how to get Zope to load the new icon. I have deleted the product from
Product Management at /Control_Panel / Products, rm the *.pyc files,
bounced Zope, but it still hangs on to the old icon.

Can anyone out there demystify this for me???

DR


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Creating properties with a product.

2000-08-16 Thread Daniel Rusch

Take a look at the doc string in the class definition of PropertyManager. It states 
that:
An object may specify that it has one or more predefined
properties, by specifying an _properties structure in its
class::

  _properties=({'id':'title', 'type': 'string', 'mode': 'w'},
   {'id':'color', 'type': 'string', 'mode': 'w'},
   )

The _properties structure is a sequence of dictionaries, where
each dictionary represents a predefined property. Note that if a
predefined property is defined in the _properties structure, you
must provide an attribute with that name in your class or instance
that contains the default value of the predefined property.

Also take a look at some of the other products out there that have properties and you 
will see how they handle them. Don't forget to update any properties you have added in 
your manage_edit member function for example: self._updateProperty('cool',cool)

Hope this helps,

DR

jesse wrote:

> Hello, I recently created a product which adds a folder, with multiple dtmldocuments 
>inside of it, effectivly creating a site immedatly.  However, even though I can add 
>folders and documents easiliy, I can't seem to create properties!
> It keeps giving me the Attribute error: aq_base.
> Here is the code for the function that does the work:
>
> def manage_addMemberSite(self, id, title='',REQUEST=None):
> """Add a MemberSite folder."""
>
> try: user=REQUEST['AUTHENTICATED_USER']
> except: user=None
>
> folder = MemberSite(id, title)
> # _setObject must be the Zope hook that actually stores this instance in
> # the ZODB
> self._setObject(id, folder)
>
> folder.manage_addFolder(id='Images', title='')
> folder.manage_addDTMLDocument(id='index_html', title='', file=index_body)
> folder.manage_addDTMLDocument(id='navbar', title='', file=navbar_html)
> folder.manage_addDTMLDocument(id='content', title='enter page content here', 
>file=default_dd_html)
>
> folder.manage_addProperty(id='nav_color', value='#483D8B', type='string')
> folder.manage_addProperty(id='content_color', value='#F0E68C', type='string')
> folder.manage_addProperty(id='background_color', value='#FF', type='string')
>
> if REQUEST:
> return self.manage_main(self, REQUEST, update_menu=1)
>
> The folder.manage_addProperty(id etc etc) does not work.  I have been looking all 
>over, have looked to where the error seems to stem from, (the valid_property_id 
>function in the PropertyManager.py) but I can't seem to find out whats wrong.  Does 
>anyone have any ideas?
>
> Please respond ASAP.
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Creating properties with a product.

2000-08-16 Thread jesse

Hello, I recently created a product which adds a folder, with multiple dtmldocuments 
inside of it, effectivly creating a site immedatly.  However, even though I can add 
folders and documents easiliy, I can't seem to create properties! 
It keeps giving me the Attribute error: aq_base.  
Here is the code for the function that does the work: 



def manage_addMemberSite(self, id, title='',REQUEST=None):
"""Add a MemberSite folder."""

try: user=REQUEST['AUTHENTICATED_USER']
except: user=None

folder = MemberSite(id, title)
# _setObject must be the Zope hook that actually stores this instance in
# the ZODB
self._setObject(id, folder)

folder.manage_addFolder(id='Images', title='')
folder.manage_addDTMLDocument(id='index_html', title='', file=index_body)
folder.manage_addDTMLDocument(id='navbar', title='', file=navbar_html)
folder.manage_addDTMLDocument(id='content', title='enter page content here', 
file=default_dd_html)

folder.manage_addProperty(id='nav_color', value='#483D8B', type='string')
folder.manage_addProperty(id='content_color', value='#F0E68C', type='string')
folder.manage_addProperty(id='background_color', value='#FF', type='string')

if REQUEST:
return self.manage_main(self, REQUEST, update_menu=1)


The folder.manage_addProperty(id etc etc) does not work.  I have been looking all 
over, have looked to where the error seems to stem from, (the valid_property_id 
function in the PropertyManager.py) but I can't seem to find out whats wrong.  Does 
anyone have any ideas?

Please respond ASAP.  



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Creating properties with a product.

2000-08-16 Thread jesse



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Python function within a ZClass...

2000-08-16 Thread Martijn Pieters

On Wed, Aug 16, 2000 at 06:11:32PM +0100, Vincent wrote:
> Is it possible to access Python function within a ZClass ?
> 
> If yes, how should I do that ?

Just create an External Method.

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Python function within a ZClass...

2000-08-16 Thread Vincent

Is it possible to access Python function within a ZClass ?

If yes, how should I do that ?

Thanks

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Bug zClass subobjects?

2000-08-16 Thread Menard . Jean-Francois

(Second post)

(I speak french, sorry for my english!)
I created a ZClass, zRow.  This class can contain other ZClass: zField_Text,
zField_Date, etc.
This let me define the columns contained in a zRow.
I then defined a Class zTable, wich contains zRows.

Question:

-  In my manage tabs, I needed to have a tab "Define columns".  To
achieve this, I inserted a ZRow Instance (with id "Definition") in my zTable
product definition, and a method called "Define_Columns", containing:


  


And I defined a view "Define Columns" pointing to that method.  When
i click on the "Define Columns", I can see the manage screen of the instance
"Definition", that's what I wanted.

But when I try to add a zField to "Definition" instance, the zField
instance is created at the zTable level,
not IN "Definition" instance!  All the classes are derived from on
CatalogAware, ObjectManager.

I HAVE to deliver the product for the end of the week, so PLEASE
help me!


Jean-François Ménard
Intranet DPAS
Pratiques d'affaires et orientations
*(514) 840-3000  poste 3939
*  (514) 840-5585
*  [EMAIL PROTECTED]
* 855 Ste-Catherine est, 6e étage
  Montréal, Qué. H2L 4P5


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] How can I find memory leaks in External Methods?

2000-08-16 Thread Andy McKay

One place to start is /Control_Panel/DebugInfo/manage_main but Im not sure
if this will work for External Methods. But it does show the objects in
memory and the change over time.

--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "Tony McDonald" <[EMAIL PROTECTED]>
To: "Zope List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 8:51 AM
Subject: [Zope] How can I find memory leaks in External Methods?


> I have an External method that is used to upload files to a unix file
system.
>
> Thing is, it seems to be causing more and more memory to be used by Zope.
>
> Can anyone give me some pointers on what might be causing this?
>
> TIA
> Tone
> --
> Dr Tony McDonald,  FMCC, Networked Learning Environments Project
> http://nle.ncl.ac.uk/
> The Medical School, Newcastle University Tel: +44 191 222 5116
> Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] How to use RESPONSE.redirect ?

2000-08-16 Thread Kapil Thangavelu

"R. David Murray" wrote:
> 
> On Tue, 15 Aug 2000, Kapil Thangavelu wrote:
> > #example call to above
> > #
> 
> If your original form submits using the GET method, then QUERY_STRING
> will contain the already URL encoded parameters that the browser
> sent originally.

True. However, the GET method is of limited utility which is not
appropiate for many situations mainly because of size constraints.
Examples, file upload, most anything with text area, stuff with a user
passwd. Granted the above example is something that is going to stick
the whole thing in the URL anyways. But the two python methods can be
used for both GETs and POSTs and if you use the second method
url_encode_vars you can pass it a  dict of only those values you want to
receive in the next page example.


> DTML also has a url_encode format you can use to cause a string to
> be url encoded if it isn't already.  Check the dtml reference.

been there, done that.

DTML fmts are useful only for inserting text into a page or link with a
 or the entity syntax. there are no functions that will
encode a var in a pythonish expression("") which is what you need when
doing this with a redirect. 


Cheers

Kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] reindex_object in External method

2000-08-16 Thread Francois-Regis CHALAOUX

Hi,

Howto reindex a new ZClass instance (ZCalatog aware) in an External method?

I tried this following code but nothing seems to be reindexed !!

def addZClass(self,id,data):
   newob=id
   newob.propertysheets.Properties.manage_changeProperties(data)
   self._setObject(id,newob)
   newob.reindex_object()


Bye, FR
  
  
  
  
  
  
  
  
  
  
  
  
 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Bug zClass subobjects?

2000-08-16 Thread Rik Hoekstra




> 
> (Second post)
> 
> (I speak french, sorry for my english!)
> I created a ZClass, zRow.  This class can contain other ZClass: zField_Text,
> zField_Date, etc.
> This let me define the columns contained in a zRow.
> I then defined a Class zTable, wich contains zRows.
> 
> Question:
> 
> -  In my manage tabs, I needed to have a tab "Define columns".  To
> achieve this, I inserted a ZRow Instance (with id "Definition") in my zTable
> product definition, and a method called "Define_Columns", containing:
> 

Perhaps it is a better idea to assign the Define_Columns in the Views of
you zTable zclass definition (it is a separate tab in the management
interface there). You can assign any tab name there to any method in you
zclass. 

But I'm not sure I understand this correctly


> 
>   
> 
> 
> And I defined a view "Define Columns" pointing to that method.  When
> i click on the "Define Columns", I can see the manage screen of the instance
> "Definition", that's what I wanted.
> 
> But when I try to add a zField to "Definition" instance, the zField
> instance is created at the zTable level,
> not IN "Definition" instance!  All the classes are derived from on
> CatalogAware, ObjectManager.

Are they by any chance nested ZClasses? If so, this is a known problem.
If not, it is not entirely clear what you're doing. In general, if you
create a ZClass instance to make it appear in the target you intend, it
is important to do so through calling it through a
manage_addProduct['yourclass']._factory and _not_ directly
through the _add method.

But once again, it is not entirely clear to me what you try to do

> 
> I HAVE to deliver the product for the end of the week, so PLEASE
> help me!


hth

Rik

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] How can I find memory leaks in External Methods?

2000-08-16 Thread Tony McDonald

I have an External method that is used to upload files to a unix file system.

Thing is, it seems to be causing more and more memory to be used by Zope.

Can anyone give me some pointers on what might be causing this?

TIA
Tone
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5116
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] zShop

2000-08-16 Thread Stephan Goeldi

I installed zShop according to the installation instructions.
When I come to the point where they write:

"Click on your newly created Catalog and start
adding products and categories."

I receive the following error message:

Error Type: NameError
Error Value: 'CATEGORYSTORAGE' no such relation in DB




Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Import classes in External method

2000-08-16 Thread Phil Harris

you need to put them in zope_dir/lib/python/shared/your_dir

Then in your external method:

import your_dir.myclass

hth

Phil

- Original Message -
From: "Francois-Regis CHALAOUX"
<[EMAIL PROTECTED]>
To: "Receipt Notification Requested" <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 3:16 PM
Subject: [Zope] Import classes in External method


> Hi,
>
> How to import classes in an External method?
>
> I mean, where to place the module where my class is defined. I tried to
put it
> in "lib/python/" or "Zope-2-2-0/lib/python/Shared", or in
> "/usr/lib/python1.5/" but I always got the same message :
>
>
> The errror
> ===
>
> Error Type: SystemError
> Error Value: Failed to import class myclass from module __main__
>
> mycode
> ==
>
> import module_of_class
>
> def useClass(self):
> foo = module_of_class.myclass()
>
>
> Bye, FR.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] HTTP_ACCEPT

2000-08-16 Thread Spicklemire, Jerry

Greetings Zope Fans,

There is a value included in "REQUEST" called HTTP_ACCEPT. 
Is there a way within Zope to reset this value? 

The default seems to be "*/*", but our sysadmin says Zope 
would get along better if we can change it to include the 
alias that Zope has been assigned by our Proxy Server.

Thanks!
Jery S.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] DTML: fetch an object by its url?

2000-08-16 Thread R. David Murray

On Wed, 16 Aug 2000, Chris Withers wrote:
> Shame no-one implemented this into the entity syntax :(
> 
> &dtml-/some/folder/and/path/wotsit; would be so nice ;-)

Ooo, that's seriously *ugly* looking syntax .

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Import classes in External method

2000-08-16 Thread Francois-Regis CHALAOUX

Hi,

How to import classes in an External method?

I mean, where to place the module where my class is defined. I tried to put it
in "lib/python/" or "Zope-2-2-0/lib/python/Shared", or in
"/usr/lib/python1.5/" but I always got the same message : 


The errror
===

Error Type: SystemError
Error Value: Failed to import class myclass from module __main__ 

mycode
==

import module_of_class

def useClass(self):
foo = module_of_class.myclass()


Bye, FR.
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Extra spaces on the end of id's?

2000-08-16 Thread Jean Jordaan

Hi Zopers

What's with the spaces ('%20') in the following from::

 
/Control_Panel/Products/ccDoc/ccDocClass/propertysheets/methods/manage
_main

http://corpcomms/Control_Panel/Products/ccDoc/ccDocClass/propertyshe
ets/methods" METHOD="POST">

[...]
  

  

  
  
  edit_properties

[...]

  

  
  
  edit_propertiesForm

[...]


-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] intermittent problems downloading portal files

2000-08-16 Thread Lucas Hofman

We use PTK as an intranet for a R&D company. Users publish their reports
as in PDF format using portal file object type. 

Now and then (enough to be irritating, but not reproducable on demand)
the PDF file gets corrupted in the download, resulting in the reader
complaining (typically "file does not start with %PDF...")

The server runs linux (mandrake 7), Zserver2.1.6, Zope 2.1.6 and PTK
0.7.1
The clients are heterogenous, IE5, Netscape 4.x on both PC and
workstations.

Anybody a clue what can cause this?

-- 
Lucas Hofman
PGS Serestel: +47 67514059
PO Box 354   fax: +47 67526640
N-1324 Lysaker, Norway



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ProxyPass - where ???

2000-08-16 Thread Stephan Goeldi

How about a trailing / after okstudio?

>
>ServerName www.mydomaine.com.au
>ProxyPass / http://demon.server.com.au:8080/okstudio
>ProxyPassReverse / http://demon.server.com.au:8080/okstudio
>


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] __call__ error message - I gave up

2000-08-16 Thread Aleksander Salwa


On Wed, 16 Aug 2000, cuiod-tec Jens Gelhaar wrote:

> 
>   
> 
> 
[...]
> works fine, if there is no reference to another object. But when I put
> something like
>  in one of this DTML Document I get the appended error
> message.
> 

Change it to . Probably it's a bug in Image
class.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Simple acquisition (?) question

2000-08-16 Thread Geir Bækholt

on Wednesday, August 16, 2000 Jean Jordaan wrote :

JJ>   
...

JJ> What further confuses me is that '/docs' has no title, and it
JJ> contains 'index_html (Document Warehouse)'. Now 
JJ> 'standard_html_header' renders '/docs/index_html's title. 

JJ> If '/' has no title and '/index_html' does, 
JJ> 'standard_html_header' renders no title. This seems inconsistent.
JJ> Because there's acquisition stuff that escapes me, doubtless.
JJ> Anyone have 50c worth of enlightenment?

Check whether those index_htmls are DTML methods or DTML
documents..

DTML Documents have properties of their own, and return
their title, when title_or_id is callet upon them..

DTML methods are just that, methods of their container, in
this case their folder, and so returns the folder's title
when title_or_id is called on them ..

see also :
http://www.zope.org/Members/michel/HowTos/DTMLMethodsandDocsHowTo


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] HOWTO (but to be improved) - linking to neighbours

2000-08-16 Thread Marcin Kasperski

[ Below I describe my solution to the problem which seems to me to be
fairly frequent. Maybe someone is interested, maybe someone can show me
better (faster, shorter) solution ]

* Problem 

The problem: while presenting some page, I would like to automagically
add links to 'previous' and 'next' page in the same directory. Say you
organize a bunch of HOWTOS and you would like to let the people navigate
via 'next' links - without going back go table of contents.

* Idea

What I really need is to calculate identifiers of 'neighbours' of my
page in its container. I do have id of the current page, I can easily
got list of all identifiers in the container. So I can just scan this
list, find my id and read previous and next element. Transforming it
into hyperlink is natural.

* Code

First I create the following Python Method (could be External Method as
well). The method returns tuple (previous_id, next_id) substituting ''
if there is no such element (we are at the start or at the end).

--
Name: neighbours
Parameters: self,myId,allIds
Contents:

position = 0
for x in range(0, len(allIds)):
if allIds[x] == myId:
position = x
break
else:
raise 'Internal inconsistency: id ' + str(myId) + ' does not belong
to list ' + str(allIds)

left = ''
right = ''

if position > 0:
left = allIds[position - 1]
if position < len(allIds) - 1:
right = allIds[position + 1]

return (left, right)
--

Then I add standard_html_footer DTML Method to the directory with my
iterated items. I put there sth like that (of course presentation can
vary, 'MyHowto' is the metatype of objects I iterate over, as you can
see I call original footer after writting my navigational details):

-



  

   
  ">Previous
   
   
   


   Table of Contents


   
  ">Next
   
   
   

  







--

(by the way I do not know why I need 'myId=id' in  - but removing
it and putting id on the neighbours parameters list does not work)

* Unsolved problems

There are two important unsolved problems:
- efficiency - I perform linear scan which can be expensive if my
directory contains a lot of objects (I do not know good method to solve
it - I would need some help from Folder class)
- order - if I need to present my objects in some order other than
default, I would need to sort allIds in some way (probably I would need
youse objectValues instead of objectIds)

* Minor tricks

The python method I wrote is generic, I use the same method for two
different folders.

In fact I worked around the order problem for the very simple case -
presenting everything in reverse order. I just exchanged neigh[0] and
neigh[1] in standard_html_footer.



-- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl 
|
| You have the right to say how long each requirement will take you to  
| implement, and to revise estimates given experience. (Ken Beck's  
| Second Developer Right)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] getting rid of PTKDemo

2000-08-16 Thread Tony McDonald

Anyone know how I can get rid of this?

I don't have it in my lib/python/Products folder. I don't have it in 
my Control_Panel/Products folder. I have compacted the database and 
restarted my server.

I still get errors when trying to do selecte the 'Advanced tab' in 
*any* ZSQL method.

Anyone who tells me how to get rid of this thing gets a pint (you'll 
have to come to Newcastle to collect)

cheers
Tone
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5116
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] __call__ error message - I gave up

2000-08-16 Thread Peter Bengtsson

Maybe you've got the syntax wrong. Have you tried these, and what they
return.


   



   



   



   



   



   


I honestly don't know the difference. If my DTML doesn't work I tend to
trial-and-error my way to it, and not bother why things happen and don't
happen.


Don't give up!!

Cheers, Peter

> What I like to do is pretty simple, but I don't get it. The following code
> snippet is simple and what I want to is straightforward:
>
> 
>   
> 
>
> All DTML Documents in a Folder should be put together in one document. It
> works fine, if there is no reference to another object. But when I put
> something like
>  in one of this DTML Document I get the appended
error
> message.
>
> Any Idea
>
> Jens
>
> 
> Error Type: AttributeError
> Error Value: __call__
>
>
> Traceback (innermost last):
>   File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 222, in
> publish_module
>   File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 187, in
> publish
>   File E:\Programme\WebSite\lib\python\Zope\__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
>   File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 171, in
> publish
>   File E:\Programme\WebSite\lib\python\ZPublisher\mapply.py, line 160, in
> mapply
> (Object: index_html)
>   File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 112, in
> call_object
> (Object: index_html)
>   File E:\Programme\WebSite\lib\python\OFS\DTMLMethod.py, line 172, in
> __call__
> (Object: index_html)
>   File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_String.py, line
> 502, in __call__
> (Object: index_html)
>   File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_In.py, line
691,
> in renderwob
> (Object: objectItems('DTML Document'))
>   File E:\Programme\WebSite\lib\python\OFS\DTMLDocument.py, line 167, in
> __call__
> (Object: subdocument)
>   File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_String.py, line
> 502, in __call__
> (Object: subdocument)
> AttributeError: (see above)
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Simple acquisition (?) question

2000-08-16 Thread Jean Jordaan

Hi all

I have 'index_html (Welcome to the Mosaic Intranet)' 
and 'standard_html_header' in '/' (the site root).

'standard_html_header' does the usual::

  

Maybe I shouldn't be, but I was somewhat surprised that this
renders the title of '/' instead of the title of 'index_html'.
("title" == "the title property of").

What further confuses me is that '/docs' has no title, and it
contains 'index_html (Document Warehouse)'. Now 
'standard_html_header' renders '/docs/index_html's title. 

If '/' has no title and '/index_html' does, 
'standard_html_header' renders no title. This seems inconsistent.
Because there's acquisition stuff that escapes me, doubtless.
Anyone have 50c worth of enlightenment?

-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] DTML: fetch an object by its url?

2000-08-16 Thread Phil Harris

Acquisition

- Original Message - 
From: "Peter Bengtsson" <[EMAIL PROTECTED]>
To: "Phil Harris" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 10:03 AM
Subject: Re: [Zope] DTML: fetch an object by its url?


> 
> What's the difference between:
>  (for current folder)
> or  (for current object)
> 
> and
> 
> 
> > 
> ??
> 
> 
> > 
> > - Original Message - 
> > From: "Scott Shepherd" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, August 16, 2000 5:06 AM
> > Subject: [Zope] DTML: fetch an object by its url?
> > 
> > 
> > > In DTML is it possible to get an object using its url? Something like
> > > 
> > > ...
> > > 
> > > Similar to
> > > 
> > > ...
> > > 
> > > but what I have is the object's zserver url, not its name in the 
> > > current namespace.
> > > 
> > > TIA,
> > > Scott
> > > 
> > > ___
> > > Zope maillist  -  [EMAIL PROTECTED]
> > > http://lists.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists - 
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > 
> > 
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > 
> 
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] DTML: fetch an object by its url?

2000-08-16 Thread Peter Bengtsson


What's the difference between:
 (for current folder)
or  (for current object)

and


> 
??


> 
> - Original Message - 
> From: "Scott Shepherd" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 16, 2000 5:06 AM
> Subject: [Zope] DTML: fetch an object by its url?
> 
> 
> > In DTML is it possible to get an object using its url? Something like
> > 
> > ...
> > 
> > Similar to
> > 
> > ...
> > 
> > but what I have is the object's zserver url, not its name in the 
> > current namespace.
> > 
> > TIA,
> > Scott
> > 
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Python class and ZClass

2000-08-16 Thread Vincent

Hi,

I would like to subclass a Python class with a ZClass.

I mean that my DTML document will declare ZClass and I would like to be able
to access the method declared in the python class (parent of the ZClass).

Does anybody knows how to do that ?

PS : I read a paper call "SubClassing from Custom Python classes", but I did
not understood everything, so if somebody can give me an example or the main
steps to solve my problem...

Thank you very very much

Vincent


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] __call__ error message - I gave up

2000-08-16 Thread cuiod-tec Jens Gelhaar

What I like to do is pretty simple, but I don't get it. The following code
snippet is simple and what I want to is straightforward:


  


All DTML Documents in a Folder should be put together in one document. It
works fine, if there is no reference to another object. But when I put
something like
 in one of this DTML Document I get the appended error
message.

Any Idea

Jens


Error Type: AttributeError
Error Value: __call__


Traceback (innermost last):
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File E:\Programme\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File E:\Programme\WebSite\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: index_html)
  File E:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: index_html)
  File E:\Programme\WebSite\lib\python\OFS\DTMLMethod.py, line 172, in
__call__
(Object: index_html)
  File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
(Object: index_html)
  File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_In.py, line 691,
in renderwob
(Object: objectItems('DTML Document'))
  File E:\Programme\WebSite\lib\python\OFS\DTMLDocument.py, line 167, in
__call__
(Object: subdocument)
  File E:\Programme\WebSite\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
(Object: subdocument)
AttributeError: (see above)


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Structured Text Rendering and \r

2000-08-16 Thread Chris Withers

Dieter Maurer wrote:
> Chris Withers writes:
>  > I have a list of string.strip'ped strings which I'd like to render using
> 

Erk, they weren't actully being stripped, I meant what was supposed to
the happening was \r\n and \n\r were both supposed to be replaced by \n,
but the regular expression to do that was broken and so wasn't
working...

> 2) why just the one paragraph beign picked up, instead of 4?
> You said, the list consists of "strip"ped strings?
> Structured text uses indentation and newlines to
> determine paragraphs and their nesting.

Found the problem. Due to the dodgy regular expression, some of the
lines I was joining had \r's in them.
Apparently, \r's interact badly with the Structured Text paragraph
detecter, which matches \n(some spaces)\n
I'll go comment on that in the StructuredTextNG wiki...

>  > 3) why are the '-'s being turned into list items?
> This is what structured text should do:
> a paragraph (!) starting with '-' or '*' is turned into
> a list item.
> Because, however, no paragraphs are recognized, I would
> not expect to see list items.

Gak.. I meant "why are the '-'s _not_ being turned into list items?" :S

The reason was 'cos none of the paragraph seperations were being picked
up...

sorry for the confusion...

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] UserDb, GUF, LoginManager, etc, which one?

2000-08-16 Thread Martijn Faassen

[various folks basically suggest using UserDb and give useful tips]

Okay, thanks for the suggestions, folks -- UserDb it will be, then!

Regards,

Martijn


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] DTML: fetch an object by its url?

2000-08-16 Thread Chris Withers

Phil Harris wrote:
> 
> 
> 

Shame no-one implemented this into the entity syntax :(

&dtml-/some/folder/and/path/wotsit; would be so nice ;-)

cheers,

Chris

PS: I wonder if that'd make a good little dev.zope.org project?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] DTML: fetch an object by its url?

2000-08-16 Thread Phil Harris



- Original Message - 
From: "Scott Shepherd" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 5:06 AM
Subject: [Zope] DTML: fetch an object by its url?


> In DTML is it possible to get an object using its url? Something like
> 
> ...
> 
> Similar to
> 
> ...
> 
> but what I have is the object's zserver url, not its name in the 
> current namespace.
> 
> TIA,
> Scott
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Best way to subclass DTML Document and some other ZClassesquestions

2000-08-16 Thread Marcin Kasperski

"R. David Murray" wrote:
> 
> On Mon, 14 Aug 2000, Marcin Kasperski wrote:
> > 1) How can I set standard DTML Document properties (title!) from my
> > constructor? I created constructor form and constructor method, I
> > succesfully prompt for and set all my properties but I do not know how
> > to set properties belonging to DTML Document.
> 
> Pass it as an argument to the call that creates the DTML Document.

How? 
Currently my constructor method contains
the following (mk_dtml_document is my custom class which subclasses DTML
Document, Extra is the name of my custom propertysheet):



  
   How can I change original title? 
  



title is present in REQUEST and is not set in created document.

> 
> > 2) Can I do anything to have single property screen which would behave
> > as original DTML Document property screen but present both original
> > properties and properties belonging to my custom property sheet?
> 
> Yep.  You should be able to replicate everything the original
> constructor code does in your own code.  Read The Source, Luke .
> 

I hate replicating code. I love calling it. Couldn't it be done this
way?


> > 4) Can I do something to have ZCatalog PrincipiaSearch (i.e. full text
> > search) to scan some property of my custom ZClass (say property body
> > from propertysheet Basic)?
> 
> You can add that property name as an index, and construct your
> search form so the search string is submitted to it (see the Advanced
> ZCatalog Searching HowTo).  Or, you could define your own
> PrincipiaSearchSource method and return whatever value is appropriate.
> I *think* you should be able to define this as a method of your
> ZClass, but I've never tried that.  I know it works from python .

I tried defining DTML Method with name PrincipiaSearchSource and
contents



(body is my custom property name).
Next I clicked 'Update Catalog' in ZCatalog screen. Seems my attempt has
been ignored - the amount of objects indexed via PrincipiaSearchSource
(according to ZCatalog status screen) has not changed (those object are
succesfully indexed on title etc).


> 
> > 5) Can I write index_html method of my custom class so it interpret DTML
> > tags (like dtml-var substitution)?
> 
> I'm sure you can, but I don't know how .  But if you are doing
> that, why not just subclass DTML-Method (or document)?

Because I have not done it previously and now I have about 100 objects
of this type and do not know how to perform such a change.


> 
> > 6) What you, Zope gurus, would do if you were to find all the DTML
> > Documents in some directory tree and remove them, creating instead 
> > Documents (where  Document is some subclass of DTML Document) - and
> > keeping the document id, title, contents and properties without change?
> 
> Write an external method to do all the object creation, property
> copying, and old object deletion.
> 

What about some sample code?


Regards

-- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl 
|
| The cost of a few uncorrected non-critical human errors is less then  
| the cost imposed by a process that tries to prevent them. 
| (Booch,Martin,Newkirk)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Best way to subclass DTML Document and some other ZClasses questions

2000-08-16 Thread Marcin Kasperski

[ I reply both to the author and Zope list, feel free to answer to the
list only ]

>  > 1) How can I set standard DTML Document properties (title!) from my
>  > constructor? I created constructor form and constructor method, I
>  > succesfully prompt for and set all my properties but I do not know how
>  > to set properties belonging to DTML Document.
> Your ZClass inherits the methods of its base classes.
> You use the base classes methods to access their features.
> 
> In your specific case, you would use "manage_changeProperties"
> to change the DTML Document properties.
> "manage_changeProperties" is defined by "OFS.PropertyManager.PropertyManager".

What exactly should I write? Currently my constructor method contains
the following (mk_dtml_document is my custom class which subclasses DTML
Document, Extra is the name of my custom propertysheet):



  
   How can I change original title? 
  



On which object (which property sheet) should I call
manage_editProperties to change document title?


> 
>  > 2) Can I do anything to have single property screen which would behave
>  > as original DTML Document property screen but present both original
>  > properties and properties belonging to my custom property sheet?
> You can create your own ZClass "view" that does this.
> 

So it is impossible to use original DTML Document property screen? I
like it.


>  > 4) Can I do something to have ZCatalog PrincipiaSearch (i.e. full text
>  > search) to scan some property of my custom ZClass (say property body
>  > from propertysheet Basic)?
> You just define "Meta Data" or indexes for them.

Not exactly. I would like to have bodies of my DTML Documents and my
custom class (which does not subclass DTML Document) .body property
contents to be indexed with _the same_ full text index.

I tried defining method PrincipiaSearchSource in my custom class but it
did not helped (ZCatalog did not indexed my objects in PrincipiaSearch
index - according to its status screen).


>  > 5) Can I write index_html method of my custom class so it interpret DTML
>  > tags (like dtml-var substitution)?
> I do not understand this question:
> 
>   "index_html" has nothing to do with interpreting DTML tags.

Yes I know. In fact I ask 'what can I do to parse DTML in a method of
object which does not subclass DTML Document?'

>   When you want to interpret DTML tags, you will need to somehow
>   use DocumentTemplate instances.

And that 'somehow' is what I am asking for.

> 
>  > And one question after the whole mess. I migrated my (fairly small so
>  > far) website from DTML Documents to my custom document class - and I did
>  > it manually. But I would not like to perform similar operation manually
>  > if the site contained 500 or 5000 pages.
> You will find in the list's archive a suggestion for converting
> DTML documents into DTML methods.
> It could be adapted for your purpose.
> 

The archives are not searchable :-(
I will try downloading them but if anyone has this article handy, I'd be
grateful.

Regards


-- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl 
|
| Osoba jest omegalizacją ewolucji uniwersalnej na  określonym odcinku  
| etapowym (Teilhard de Chardin)
|

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )