Re: [Zope-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-10 Thread Steve Alexander

Evan Simpson wrote:
 
 From: "Steve Alexander" [EMAIL PROTECTED]
obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED)
 
  This stopped working when I tried the software on Windows.
 
  Bug or feature?
 
 I'm not sure, but I'm *very* curious what you're trying to accomplish with
 this code.  A better equivalent would probably be obj =
 self.getPhysicalRoot().restrictedTraverse(REQUEST.steps).

I'm producing a set of breadcrumb-style links. I want to test whether
the object at the requested URL has the attribute "breadcrumbs_text",
because if so, that text should be used instead of the results of my
breadcrumbs algorithm.

I have an object that is a DTML Document. It has the property
"breadcrumbs_text" set.

My breadcrumbs external method is called from standard_html_header.

When I look at the DTML Document through the web, the "self" object
passed to the breadcrumbs external method is the folder that contains
the DTML Document.
(I thought that should only be the case for DTML Methods!)

So, in order to check the existence of the attribute "breadcrumbs_text",
I needed to get hold of the object that was requested. I'm not using
virtual hosting for this project (although I will be later), so I threw
REQUEST.PATH_TRANSLATED in there as I could see from inspecting REQUEST
that it would give me what I needed.

It looks like using REQUEST.steps is better because it will continue to
work with virtual hosting.  I'll change the method to use REQUEST.steps.
Thanks.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




[Zope-dev] Size of Data.fs - and crypto.

2000-09-10 Thread Erik Enge


Hi.

Does the performance of Zope degrade as the Data.fs get larger?  Both
on startup time (which I'm pretty sure will degrade) and on respons
time, serving a object f ex?

Another thing.  Have anyone tried to encrypt all data inside the
Data.fs file?  I mean, encrypted the data so that not even root can
access it, only if you have the right passphrase (or whatever) in the
management interface are you allowed access to the data.  

Anyone tried anything like that?

Thanks.

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




Re: [Zope-dev] Size of Data.fs - and crypto.

2000-09-10 Thread Erik Enge

[Chris McDonough]

| [Erik Enge]
| 
|  Another thing.  Have anyone tried to encrypt all data inside the
|  Data.fs file?  I mean, encrypted the data so that not even root can
|  access it, only if you have the right passphrase (or whatever) in the
|  management interface are you allowed access to the data.  
| 
| You'd probably need to rewrite the pickling and unpickling routines used
| in lib/python/ZODB/Connection.py to dump and load "encrypted" pickles.

I thought so...  Has anyone done this?

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




[Zope-dev] FW: ZClass, acquisition, dtml confusion

2000-09-10 Thread Jon Franz

Since no one on general could answer this, I'm sending it to Dev 
now: sorry for cross posting.

-Original Message-
From: Jon Franz 
Sent: Friday, September 08, 2000 1:24 PM
To: '[EMAIL PROTECTED]'
Subject: ZClass, acquisition, dtml confusion


Hello,
Previously I made a DTML method that when used within a 
DTML Document would modify properties on that document.  
Having this floating around in root made it visible to the 
whole site, but seemed 'unclean'.  So, I attempted to make 
the DTML method into a ZClass, and making the index_html 
method in the ZClass contain the exact same DTML as the 
method... But it doesn't work.  So, I tried again - this 
time with as simple a method as possible, a very basic 
counter.  The DTML method I made in root increments and 
displays the 'z_count' property on the page that calls it, 
and creates the property if it doesn't exist, so using it 
is as simple as:

dtml-var mycount

However, I place the DTML into a new class, and then make 
a new instance of the class, and it wont work as above.  
I now have to do this:

dtml-with MyZCCount
dtml-var MyZCCount
/dtml-with

And, instead of modifying the property of the calling document, 
it modifies the parent folder's properties.  Below is the DTML, 
can someone please explain what I need to do to get this to 
work on the calling DTML document instead?  If I can't get 
this simple counter to work I'm going to go mad, since changing 
properties is something I need to be able to do from many of my 
planned ZClasses... Thanks in advance!

dtml-if "hasProperty('z_count')"
  dtml-var "'%06d' % (z_count + 1)"
  dtml-call "REQUEST.set('z_count', z_count + 1)"
  dtml-call "manage_changeProperties(REQUEST)"
dtml-else
  dtml-call "manage_addProperty('z_count', 1, 'int' )"
  01
dtml-if

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