[Zope-dev] Question about Labels

2000-09-22 Thread Andre Schubert

Hi,

I have a Product with a Label called Foo. Now what can i do, that when
anyone clicked on the tab Foo first the function bar() is called and
after that the HTML-File is displayed.

as


manage_options =({'label':'Foo', 'action':'manage_propertiesForm'},)

def bar(self):
do anything before displaying the HTMLFile

def manage_propertiesForm(self,REQUEST):
""" doc string """
self.bar()
return HTMLFile('edit_NetzwerkForm', globals())


___
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] FTP behaviours

2000-09-22 Thread Robin Becker

Has anyone done any work in the area of ftp controlled behaviours? I
want to do something like check if an object is of a specific sort
before overwriting/creating and then take some additional actions.
-- 
Robin Becker

___
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] Previous versions of persistent objects

2000-09-22 Thread Robin Becker

Are there any methods to get access to previous versions of persistent
objects without actually carrying out the undo?
-- 
Robin Becker

___
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] Chameleon

2000-09-22 Thread Joachim Schmitz

Hi,

I just tried to use the chameleon product with zope 2.2.1 under SuSE 7.0.
After adding a new chameleon folder, I can't enter that folder, cause there
is always the authorisation-box opened. And I am not able to authorize. 
Can the chameleon product work with 2.2.x at all ?




Mit freundlichen Grüßen

Joachim Schmitz  

  
AixtraWare, Ing. Büro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven  
Telefon: +49-2464-8851, FAX: +49-2464-905163


___
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] Shared Libraries and Persistent Objects

2000-09-22 Thread Monty Taylor

Hey guys,

I've got a question about how Zope deals with shared libraries. Say
I have a 2Meg shared library that I've generated with SWIG. (I know it's
big, but for sake of argument) Say then that I create a Python Class
that imports this library and provides a front-end for each of its
exported methods. Then, I instantiate this class 2000 times within a
Zope instance. My question is, the library code is loaded into memory
once, right? That seems to be what should happen, but I want to make
sure before I start selling people here on SWIGing a few utilities and
bundling them into one of our Zope objects instead of doing fork/execs
to call an executable. I'm not shifting the burden from loading time to
storage size, am I?

Thanks,
Monty


___
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] ZSQL Methods from Python?

2000-09-22 Thread Monty Taylor

Hey, is there any doco about using ZSQL Methods from Python Products?
Also, does anyone know of any work done to extend ZSQL Methods to allow
stored-procedure calls? I know I can do an Oracle Procedure call from
DCOracle that returns a cursor, but I'd love to combine that with the
caching/pluggable brains of ZSQL Methods. Is there anything out there on
this or am I going to have to roll my own?

Thanks,
Monty


___
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] Shared Libraries and Persistent Objects

2000-09-22 Thread Jim Fulton

Monty Taylor wrote:
 
 Hey guys,
 
 I've got a question about how Zope deals with shared libraries. Say
 I have a 2Meg shared library that I've generated with SWIG. (I know it's
 big, but for sake of argument) Say then that I create a Python Class
 that imports this library and provides a front-end for each of its
 exported methods. Then, I instantiate this class 2000 times within a
 Zope instance. My question is, the library code is loaded into memory
 once, right?

Right. In fact, if you were running multiple Zope (or Python)
processes using the library, then there would only be one copy in 
memory shared among the multiple processes.

 That seems to be what should happen, but I want to make
 sure before I start selling people here on SWIGing a few utilities and
 bundling them into one of our Zope objects instead of doing fork/execs
 to call an executable. I'm not shifting the burden from loading time to
 storage size, am I?

No.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]
Technical Director   (888) 344-4332  Python Powered!
Digital Creationshttp://www.digicool.com http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] ZSQL Methods from Python?

2000-09-22 Thread Monty Taylor

Jim Fulton wrote:

 Monty Taylor wrote:

  Also, does anyone know of any work done to extend ZSQL Methods to allow
  stored-procedure calls?

 No, but I'd love to see someone tackle it. The semantics
 of stored procedures varies so widely accross databases, that
 I doubt that it would be easiliy generalizable. I think, at
 least for starters, a form of stored procedure support for
 Oracle would make alot of sense.

  I know I can do an Oracle Procedure call from
  DCOracle that returns a cursor, but I'd love to combine that with the
  caching/pluggable brains of ZSQL Methods. Is there anything out there on
  this or am I going to have to roll my own?

 I think you'd have to roll your own. If you want to
 do something reusable that other people could use, I'd be
 happy to provide whatever advice and support I can.


I think I'd like to talk to you about this. We're about to work on
transitioning a web-based product to Zope, and we use Store Procedures
exclusively. I'd love to have the extra ZSQL goo instead of having to wrap
the code at such an individual level. Maybe we can stick someone on the task.
But I'm sure we'll need a guiding hand or two. All of this assumes I can get
past the basic problem that follows...


 Note that one of the things I like about Oracle's stored procedures
 is that they allow me to avoid screwing with cursors in the common case
 that I'm getting one row of data.  I can just get the data I need through
 a straight function call.  The DCOracleStorage uses stored procedures
 almost exclusively.



I've been looking through that code (we've started using DCOracleStorage on
the backend.) For some reason, though, I can't get the stored procedure stuff
to work like you do. Check out the following:

Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production

SQL desc pgm140_api;
PROCEDURE SELECT_TARGETS
 Argument Name  TypeIn/Out Default?
 -- --- -- 
 PP_NAMEVARCHAR2IN
 PP_RESULT  REF CURSOR  IN/OUT
RECORD  IN/OUT
 AMSM_IDNUMBER(12)  IN/OUT
 NAME   VARCHAR2(80)IN/OUT
PROCEDURE SELECT_TECHNOLOGIES
 Argument Name  TypeIn/Out Default?
 -- --- -- 
 PP_CATEGORYVARCHAR2IN
 PP_RESULT  REF CURSOR  IN/OUT
RECORD  IN/OUT
 ET_ID  NUMBER(12)  IN/OUT
 NAME   VARCHAR2(80)IN/OUT

*
Then from python, with the same connection string, I do:
Python 1.5.2 (#1, Feb 14 2000, 18:27:27)  [GCC 2.95.1 19990816 (release)] on
sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
 import DCOracle.oci_
 conn=DCOracle.Connect('')
 pgm140_api=getattr(conn.procedures,'pgm140_api')
 sql_select_targets=getattr(pgm140_api, 'select_targets')
Traceback (innermost last):
  File "stdin", line 1, in ?
  File "/apps/zope/lib/python/Products/ZOracleDA/DCOracle/ociProc.py", line
324, in __getattr__
oci.error: no usable procedure named pgm140_api.select_targets


I've tried using all caps on one or both as well to no avail. Any thoughts?

Monty


___
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] ZSQL Methods from Python?

2000-09-22 Thread Jim Fulton

Monty Taylor wrote:
 
 Jim Fulton wrote:
 
(snip)
  Note that one of the things I like about Oracle's stored procedures
  is that they allow me to avoid screwing with cursors in the common case
  that I'm getting one row of data.  I can just get the data I need through
  a straight function call.  The DCOracleStorage uses stored procedures
  almost exclusively.
 
 
 
 I've been looking through that code (we've started using DCOracleStorage on
 the backend.) For some reason, though, I can't get the stored procedure stuff
 to work like you do. Check out the following:
 
 Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
 With the Partitioning option
 JServer Release 8.1.6.0.0 - Production
 
 SQL desc pgm140_api;
 PROCEDURE SELECT_TARGETS
  Argument Name  TypeIn/Out Default?
  -- --- -- 
  PP_NAMEVARCHAR2IN
  PP_RESULT  REF CURSOR  IN/OUT
 RECORD  IN/OUT
  AMSM_IDNUMBER(12)  IN/OUT
  NAME   VARCHAR2(80)IN/OUT
 PROCEDURE SELECT_TECHNOLOGIES
  Argument Name  TypeIn/Out Default?
  -- --- -- 
  PP_CATEGORYVARCHAR2IN
  PP_RESULT  REF CURSOR  IN/OUT
 RECORD  IN/OUT
  ET_ID  NUMBER(12)  IN/OUT
  NAME   VARCHAR2(80)IN/OUT
 
 *
 Then from python, with the same connection string, I do:
 Python 1.5.2 (#1, Feb 14 2000, 18:27:27)  [GCC 2.95.1 19990816 (release)] on
 sunos5
 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
  import DCOracle.oci_
  conn=DCOracle.Connect('')
  pgm140_api=getattr(conn.procedures,'pgm140_api')
  sql_select_targets=getattr(pgm140_api, 'select_targets')
 Traceback (innermost last):
   File "stdin", line 1, in ?
   File "/apps/zope/lib/python/Products/ZOracleDA/DCOracle/ociProc.py", line
 324, in __getattr__
 oci.error: no usable procedure named pgm140_api.select_targets
 
 I've tried using all caps on one or both as well to no avail. Any thoughts?

I suspect that the problem is the RECORD argument type. I don't
remember off-hand what this is, but I'm pretty sure, the DCOracle
procedure code doesn's handle this type. We (you;) would need to
either work around this or fix it.  Unless the fix is easy though,
we might want to wait for an OCI8-based Oracle interface that
someone here is rumored to be working on. :) (Actually, I *know*
that someone's working on an OCI 8 interface, but I'm not sure
what the status or priority is.)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]
Technical Director   (888) 344-4332  Python Powered!
Digital Creationshttp://www.digicool.com http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] I feel your Wiki Pain ;-)

2000-09-22 Thread Simon Michael

I like where you're going with this Martijn.

Spurred on by your concrete examples, how about this: every wiki page
has an email address and functions as a "mailing list". Eg: I could
subscribe or send edits to

ZWikiWeb:[EMAIL PROTECTED]
StructuredTextWiki:[EMAIL PROTECTED]
[EMAIL PROTECTED] (defaults to the front page)

A zwikiweb could be seen as a hierarchy of very lightweight mail
lists. When I subscribe to a page(list), I would also receive
edits(mail) to its child pages(lists) by default.

Implementation: a sufficiently smart mail server, or (better?) build
on the "mail into zope" project for an all-zope solution. Eg: I might
install and configure the "ZWikiMail" product, and suddenly my
existing wikis are mail-enabled..

Comments ?

-Simon

___
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] Re: [Zope-ZEO] Advice

2000-09-22 Thread Steve Spicklemire


We're using ZCVSMixin for just such a scenario. It's working a 
lot better than nothing. ;-) It does still have rough edges, and you
need to know too much about how it works to do anything complex, but
it does allow us to manage changes and test/stage/update etc with
a much greater degree of control than we used to have... Of course
right now it's unix only... but I should be able to fix that once
my current slate of projects are finished.

-steve

 "Andy" == Andy McKay [EMAIL PROTECTED] writes:

  One of the reasons our group is moving away from Zope is that
 it has  very poor support (if any) for the
 development/staging/live model.  We  like this model.  We
 think it's a good thing.  But sync'ing code across  multiple
 Zope installations is a royal PITA.
 
 I'd like to hear more about the problems you've had and how you
 overcome them in a different system.
 
  And no, versions are *not* the answer.
 
 Well, they are a pretty good answer for lots of applications in
 my experience.

Andy Version can work for small changes, but they certainly dont
Andy for large numbers of changes across lots of objects. And
Andy since the catalog is a key component for our site, its a
Andy real problem.


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


___
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] ZSQL Methods from Python?

2000-09-22 Thread Phillip J. Eby

At 08:43 AM 9/22/00 -0400, Jim Fulton wrote:
 Also, does anyone know of any work done to extend ZSQL Methods to allow
 stored-procedure calls?

No, but I'd love to see someone tackle it. The semantics
of stored procedures varies so widely accross databases, that
I doubt that it would be easiliy generalizable. I think, at
least for starters, a form of stored procedure support for
Oracle would make alot of sense.


Ty and I have put together a Stored Procedure method for Sybase; it
requires a minor patch to ZSybaseDA, however, to allow for the status code
return.  I'm not sure how useful it would be to anyone else, though, since
all we ever do with stored procedures is process the return value, and
ignore any actual SELECT results.


___
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] ZSQL Methods from Python?

2000-09-22 Thread Jim Fulton

"Phillip J. Eby" wrote:
 
 At 08:43 AM 9/22/00 -0400, Jim Fulton wrote:
  Also, does anyone know of any work done to extend ZSQL Methods to allow
  stored-procedure calls?
 
 No, but I'd love to see someone tackle it. The semantics
 of stored procedures varies so widely accross databases, that
 I doubt that it would be easiliy generalizable. I think, at
 least for starters, a form of stored procedure support for
 Oracle would make alot of sense.
 
 
 Ty and I have put together a Stored Procedure method for Sybase; it
 requires a minor patch to ZSybaseDA, however, to allow for the status code
 return.  I'm not sure how useful it would be to anyone else, though, since
 all we ever do with stored procedures is process the return value, and
 ignore any actual SELECT results.

I think it would be useful. Can you get multiple return values?

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
Technical Director   (888) 344-4332http://www.python.org  
Digital Creationshttp://www.digicool.com   http://www.zope.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] ZSQL Methods from Python?

2000-09-22 Thread Phillip J. Eby

At 12:49 PM 9/22/00 -0400, Jim Fulton wrote:
"Phillip J. Eby" wrote:
 
 Ty and I have put together a Stored Procedure method for Sybase; it
 requires a minor patch to ZSybaseDA, however, to allow for the status code
 return.  I'm not sure how useful it would be to anyone else, though, since
 all we ever do with stored procedures is process the return value, and
 ignore any actual SELECT results.

I think it would be useful. Can you get multiple return values?


By "return value", I mean the "return status" code which is an integer
returned by the Sybase "RETURN" statement.  Sybase also can generate its
own, negative-numbered return statuses, which indicate a Sybase error.
These error codes can include ones that mean the current transaction has
already been aborted.

Apart from the "return value", a Sybase stored procedure can execute
SELECT's which result in rows being returned.  We have never used this
capability, so I'm not sure what would need to be done for it to be
practical.  We ordinarily use stored procedures only to perform inserts,
updates, deletes, and other things that only need a integer result if
anything.  (Eg: get next counter value to assign an object identifier.)


___
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] ZSQL Methods from Python?

2000-09-22 Thread Jim Fulton

"Phillip J. Eby" wrote:
 
 At 12:49 PM 9/22/00 -0400, Jim Fulton wrote:
 "Phillip J. Eby" wrote:
 
  Ty and I have put together a Stored Procedure method for Sybase; it
  requires a minor patch to ZSybaseDA, however, to allow for the status code
  return.  I'm not sure how useful it would be to anyone else, though, since
  all we ever do with stored procedures is process the return value, and
  ignore any actual SELECT results.
 
 I think it would be useful. Can you get multiple return values?
 
 
 By "return value", I mean the "return status" code which is an integer
 returned by the Sybase "RETURN" statement.  Sybase also can generate its
 own, negative-numbered return statuses, which indicate a Sybase error.
 These error codes can include ones that mean the current transaction has
 already been aborted.
 
 Apart from the "return value", a Sybase stored procedure can execute
 SELECT's which result in rows being returned.  We have never used this
 capability, so I'm not sure what would need to be done for it to be
 practical.  We ordinarily use stored procedures only to perform inserts,
 updates, deletes, and other things that only need a integer result if
 anything.  (Eg: get next counter value to assign an object identifier.)

Ah, too bad. Can Sybase *only* return values through selected rows?

Oracle's stored procedures are much more like traditional procedures
and therefore extremely useful even when no results are returned.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
Technical Director   (888) 344-4332http://www.python.org  
Digital Creationshttp://www.digicool.com   http://www.zope.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] ftp-acces to Zope: rename command

2000-09-22 Thread Klaus Woelfel

Hi,
I have the following problem:
One great thing in Zope is the ftp acces to objects. And in combination
with the ftp-abilities of kfm and kwrite in kde1.2 it worked very nice for me
to edit DTML-Documents in kwrite.

But now in kde2 the the i/o System of kde (kio) has changed and when I
edit an DTML-Document with kwrite in kde2 and want to save, kwrite (in fact
kio) first creates a new file named file_name.part and then renames it to
file_name.

No the problem is that the ftp part of ZServer doesn't support to rename
an object. When I type "rename file file_old" in the linux terminal-ftp
client, he says: "500 'RNFR': command not understood."

So I'm asking if anybody knows how to solve this problem, or if there is
anybody who can tell me where in the source of Zope I have to look to
implement the "rename" command in ZServer. On the IRC Zope-cannel they told
 me that this wouldn't be too difficult. But maybe it is already implemented
 an I only have to activate it...

Bye,
Klaus

___
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] Do I really understanding caching?

2000-09-22 Thread Andy McKay

We have been looking at caching in Zope as a way of tweaking performance.
Heres an example of what I think happens:

- Supposing I have a 1,000 object catalog. If one person changes an catalog
aware object, that instance of the catalog will be pulled out of the ZODB
and changed. It will then be written to the ZODB. That last copy will stay
in the cache for as long as the "Cache Parameters" are set to allow.

- If somebody changes another catalog aware object, that will repeat the
above process.

- However simply accessing the catalog (no changes) will pull the object
from the cache.

- What would be really nice is if the object only got written to the cache
when it is no longer used, that way every time the catalog changed it didnt
write to ZODB instead it changed the cached version. Of course that does
bring up the recovering from disaster problem.

So do I understand it correctly?

--
  Andy McKay, Developer.
  ActiveState.


___
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] Do I really understanding caching?

2000-09-22 Thread Andy McKay

Thanks
 
 (I'm only talking about text indices here.)
 
 Note that the Catalog is actually a tree of database/cache objects. 
 There are a series of buckets and sub-buckets that end in a word
 object.  The buckets, sub-buckets, and words are all database objects
 and can be cached/updated separately.
 
 Put another way, every branch and leaf on the tree in a Catalog is a
 separately stored and cached database object.
 
 The 1,027 words in the document (and the branches on the tree to get to
 them) that was updated would obey the cache parameters.

Hmm, that is a significant optimization, and one I was not aware of.
 
 What problem are you trying to solve -- response time, memory usage,
 disk usage?

All of the above :)



___
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] Do I really understanding caching?

2000-09-22 Thread Chris McDonough

Statement of possible BS: I am speaking from how I understand the
catalog
to work, and possibly not how it actually *does* work. :-)

Andy McKay wrote:
 
 We have been looking at caching in Zope as a way of tweaking performance.
 Heres an example of what I think happens:
 
 - Supposing I have a 1,000 object catalog. If one person changes an catalog
 aware object, that instance of the catalog will be pulled out of the ZODB
 and changed. It will then be written to the ZODB. 

Actually, a subobject of the catalog which is stored in a BTree will
change,
and the Catalog instance will change, but it will not write the entire
contents of the catalog back out to the ZODB.  The current BTree
implementation has some problems, so other unrelated objects in it may
be
changed on the write.  This will be solved by updates to the catalog
which use a new "broadtree" BTree implementation.

 That last copy will stay
 in the cache for as long as the "Cache Parameters" are set to allow.

The changed subobjects will, yes.  Unless they're manually ghosted for
some other reason (rarely happens, if ever).

 - If somebody changes another catalog aware object, that will repeat the
 above process.

Yes.

 - However simply accessing the catalog (no changes) will pull the object
 from the cache.

Yes.

 - What would be really nice is if the object only got written to the cache
 when it is no longer used, that way every time the catalog changed it didnt
 write to ZODB instead it changed the cached version. Of course that does
 bring up the recovering from disaster problem.

This would break transactional integrity.  It's important that the
catalog
is in a self-consistent state as well as be consistent with other
objects in the ZODB, and transactions help to maintain this.

Is it essential that all your cataloged objects be catalog-aware?

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

___
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] standard_error_message confusion

2000-09-22 Thread Danny William Adair

My standard error_message is ok.

I think my problem with LoginManager and Membership can be cut down to this:

If I take away all permissions from a dtml-document for Anonymous, he will
be correctly prompted for Login using *my* standard_error_message
("LoginRequired" is raised) as soon as he tries to access it. _But_, if I
take away the rights for Anonymous from a _folder_ under which a dtml
document acquires these security settings, he'll get the hard-coded Zope
error_message with the login field, instead of my (customized one). Whassup?

TIA Danny

-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von
Steve Alexander
Gesendet: Dienstag, 19. September 2000 13:03
An: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Betreff: Re: [Zope] standard_error_message confusion


Danny William Adair wrote:

 Hi all!

 I'm using LoginManager to provide for a non-HTTP authentication. A role
 "Member" has access to a folder "Restricted", the
 role "Anonymous" doesn't have any rights at all in this folder. All
objects
 in this folder acquire these security settings.
 So far, so good.

 The login form from the LoginManager product raises "LoginRequired" and
 shows the login screen when necessary. Mysteriously, I don't get to see my
 (customized) standard_error_message, but *the* standard error message when
I
 try to access the folder unauthenticated. Now if I give Anonymous the
right
 to "View" in the "Restricted" folder (and therefore view all contained
 objects - which I naturally don't want to do) and explicitly take that
right
 away for index_html, any unauthenticated client trying to access the
folder
 (-index_html) will see *my* standard_error_message (containing the login
 screen).

 What is this all about?

Without looking closely at your system, it is hard to say. Perhaps your
standard_error_message is itself causing an error of some kind.
Therefore, you're getting the zope hard-coded error message.

Try commenting out most of your standard_error_message, so that there is
no possible way it could cause an error, then see if you see your
version or the Zope hardcoded version.

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


___
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] Re: [Zope-PTK] Cannot import DemoPortal.zexp

2000-09-22 Thread Bill Welch

Bet you can't import Wizard.zexp either and the traceback shows the
identical pickled data.

I'm battling a very similar problem and so far I think it's subtle
corruption of the ZODB having to do with ZDiscussion. Note that the
pickled data contains references to ZDiscussion. The pickled data in my
traceback also contains references to ZDiscussion, although it's a
different oid (\023w) and, therefore, record. There're no ZDiscussion
records in DemoPortal.zexp or Wizard.zexp.

At one point, after the nth time removing and reinstalling ZDBase, etal;
DemoPortal and Wizard appeared *without me importing them*. I removed and
reinstalled everything one more time (bad move!). DP and W disappeared and
now import gives Duplicate Class Id.

I think your import actually worked, but ran over somehow and crashed
before the prodcuts could be registered.

I'm in the midst of analyzing my Data.fs. Fsrecover doesn't find any
problems. Tranalyzer has a couple of bugs with versions that I'm working
through. I'll let you know.

Bill.

On Fri, 22 Sep 2000 [EMAIL PROTECTED] wrote to zope-PTK:

   File /usr/local/zope/lib/python/ZODB/Connection.py, line 154, in __getitem__
 (Info: ('\000\000\000\000\000\000\034\315',
 
'(cExtensionClass\012ExtensionClass\012q\001(U\006ZDItemq\002(cZClasses.ZClass\012PersistentClass\012q\003cProducts.ZDBase.ZDiscussions\012ZDItem\012q\004cOFS.SimpleItem\012SimpleItem\012q\005tq\006}q\007(U\004iconq\010UWControl_Panel/Products/ZDiscussion
 
s/ZDTopic/propertysheets/methods/ZDItem%20/ziconImageq\011U\012_p_changedq\012K\001U\007__doc__q\013U\021ZDiscussions
 
Itemq\014U\006_p_oidq\015U\010\000\000\000\000\000\000\002Lq\016U\011meta_typeq\017U\021ZDiscussions
 
Itemq\020U\016propertysheetsq\021(U\010\000\000\000\000\000\000\034\320q\022(NU\010\000\000\000\000\000\000\034\314q\023Qtq\024tq\025QU\012index_htmlq\026cZClasses.Method\012MW\012q\027NRq\030}q\031U$_ZClassMethodPermissionMapperMethod_q\032(U\010\000\000
 
\000\000\000\000\034\321q\033(U\016OFS.DTMLMethodq\034cOFS.DTMLMethod\012DTMLMethod\012q\035tq\036tq\037QsbU\016manage_optionsq
 
(}q!(U\005labelqquot;U\012Propertiesq#U\006actionq$U\025manage_propertiesFormq%u}qam!
 !
 
p;(U\005labelq\'U\010Securityq(U\006actionq)U\015manage_accessq*u}q+(h\'U\004Viewq,h)U\012index_htmlq-utq.U\012ziconImageq/(U\010\000\000\000\000\000\000\034\322q0(U\011OFS.Imageq1cOFS.Image\012Image\012q2tq3tq4QU\022__ac_permissions__q5)U\011_p_serialq6U
 
\010\0030\226a\274;\204\314q7U\012__module__q8U\031*73biqpAI2QDa2iKPitv57g==q9utq:t.N.'))
 Could not load oid Í, pickled data in traceback info may contain
 clues: (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 )




Re: [Zope] standard_error_message confusion

2000-09-22 Thread Steve Alexander

Danny William Adair wrote:
 
 My standard error_message is ok.
 
 I think my problem with LoginManager and Membership can be cut down to this:
 
 If I take away all permissions from a dtml-document for Anonymous, he will
 be correctly prompted for Login using *my* standard_error_message
 ("LoginRequired" is raised) as soon as he tries to access it. _But_, if I
 take away the rights for Anonymous from a _folder_ under which a dtml
 document acquires these security settings, he'll get the hard-coded Zope
 error_message with the login field, instead of my (customized one). Whassup?

In the latter case, does Anonymous have rights to view your
standard_error_message?

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

___
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] standard_error_message confusion

2000-09-22 Thread Steve Alexander

Danny William Adair wrote:
 
 Unfortunately, yes he does.

Time to step through your site in the debugger then. Or, instrument
HTTPRequest.py and HTTPResponse.py to see what is getting called when.

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

___
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] Re: Patch to let Authorized Exceptions use standard_error_message

2000-09-22 Thread Andy McKay

Well theres the thing, its not really a patch. I doesnt allow Authorized
Exceptions to use standard_error_message, thats a whole different kettle of
fish.

/lib/python/ZPublishers/HTTPResponse.py line 482 to 523 contains HTML text
for the error message. So you can rewrite that. Thats all I have done.

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: "William JOYE" [EMAIL PROTECTED]; [EMAIL PROTECTED]; "Tom Deprez"
[EMAIL PROTECTED]
Sent: Friday, September 22, 2000 1:26 AM
Subject: Patch to let Authorized Exceptions use standard_error_message


 Andy McKay wrote:
  Chris - you correct the comment says something about this could use
  standard_error_message I did a quick hack of changing the source for
  that file so it looks pretty (of course its totally static). Works for
me.

 Well can you please, please, please put it in the Collector as a 'bug
 with Patch' so everyone else can benefit. :-)

 ...or at the very least post the patch to the list...

 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] Q: External method processing (D/H)TML forms?

2000-09-22 Thread J.R. van Ossenbruggen


  I want to pass input from a DTML form to an external method.  So far
  the DTML is actually just a plain HTML page:

 untested try passing it the REQUEST object:
 
 def external-method(self, REQUEST):
"""whatever"""
 
 /untested

tested
 Just what I needed!
/tested

Thanks,

-- Jacco 

___
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] DTML Loop, is there a 'continue'?

2000-09-22 Thread Spicklemire, Jerry

Hi Zope Fans, 

I'm about searched out trying to find any discussion about calling a normal 
"continue" statement, as in Python, from DTML. Any ideas?

I just want to short circuit a dtml-in loop for one pass, and then finish
the rest of the loop, based on a parameter.

Thanks,
Jerry 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 Loop, is there a 'continue'?

2000-09-22 Thread Daniel Rusch

I hope there is a dtml-continue, I also have not been able to find it
though. 

What I have done is resorted to an dtml-if (or some times an
dtml-unless) that catches the condition I want to short circuit and
wrapped the code in the dtml-else. The dtml-unless probably the better
choice.

dtml-in SomeLoop
dtml-if "Something==SomethingElse"
dtml-else
The code that normally executes
/dtml-if
/dtml-in

It ain't pretty but it works


Dan

"Spicklemire, Jerry" wrote:
 
 Hi Zope Fans,
 
 I'm about searched out trying to find any discussion about calling a normal
 "continue" statement, as in Python, from DTML. Any ideas?
 
 I just want to short circuit a dtml-in loop for one pass, and then finish
 the rest of the loop, based on a parameter.
 
 Thanks,
 Jerry 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 )

___
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] FYI: Python product tutorial updated

2000-09-22 Thread Shane Hathaway

The Python product development tutorial has been updated to reflect
current practices. It is accompanied by a working product that contains
all the sample code (which should also replace the "Boring" product.)

It will likely be included in the Product Developer's Guide.

See http://www.zope.org/Members/hathawsh/TutorialUpdate .

Shane

___
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] Version Control in Zope / Managing releases

2000-09-22 Thread Casey Duncan

snip
   1) "Code Collisions."  - Developers overwriting each other's work.
   2) Partial updates - Right now, we have new pages for marketing
   content that are held up because we don't have our new features for
   the application done yet.  So we can't update marketing pages without
   updating the app at the same time, (one ZODB) unless we directly
   update the production servers. (Eeek!)
snip

Forgive me if this is overly simplistic, but these problems can both be
addressed or at least worked around by using versions, no?

Each developer should have his/her own version object. To lock the object
(and solve #1), a developer just needs to open it and click change. Then to
unlock whatever was worked on and commit it, save the changes to the
version. Granted this means only one person can work on an object at one
time. This can be worked around by proper modularization of your app. Also,
developers need to remember to save their version changes so that others can
work on those objects too. This also has a side benefit of letting you
document your changes in a more meaningful way. Also, an entire set of
changes can be rolled back if it breaks something.

#2 is more about what versions were designed for. Just work on the app code
in a version and don't commit it until it's ready. Granted this assumes that
you have sufficiently separated the data, layout and code and aren't using a
lot of external methods. If this isn't a possible solution, I would just
create a production version of the feature in one folder that might not be
complete but can be updated, and work on a second copy in another folder
that isn't accessible to everyone yet.

If this won't work please elaborate on your design and maybe someone will
have better idea.

Good Luck!
-Casey Duncan


___
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] HTML Widgets, In-place editing in Zope

2000-09-22 Thread Phill Hugo

Hi All,

We've been working on this for a few days now and I think its about time
it was uncovered.

If you try these two URLs in Mozilla or IE, you'll see what it does.

It works in Netscape 4 but doesn't do the stylesheet magic to the form
which looks less impressive.

www.opencookie.org/widgets/index_html

www.opencookie.org/widgets/index_html?editmode=1

widgets is an external method which will be on Zope.org next week if all
goes well.

Have fun.

Phill Hugo

Fortune Cookie (UK) Ltd.
Its nice in here

___
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] Exporting

2000-09-22 Thread Andy McKay

How do I export a folder using the Import/Export tab with exporting all the
subobjects?

(Stupidest suggestion so far: delete all subjects, export, undelete)
--
  Andy McKay, Developer.
  ActiveState.


___
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] What options exist for dealing with tracebacks?

2000-09-22 Thread Skip Montanaro


Having only recently upgraded from Zope 2.0 to 2.2.1 I see that the default
behavior for traceback reporting is still to embed them in an HTML comment
(or display them when debugging).  Are there other options for dealing with
tracebacks?  I'm just using ZServer to publish my own modules.  I'm not
using all of Zope.  

My users don't know Python from HTML from a hole-in-the-wall.  Asking them
to root around in HTML source or cut-n-paste tracebacks is a no-win
situation.  Besides, to ask them to do that I suspect I'd have to fiddle the
Zope source code directly.

I would love it if I could set some debug environment variable, run with
-D="[EMAIL PROTECTED]" or subclass some Error class and have tracebacks mailed
to me.  I wouldn't even care about the flood of email.  At least I'd have
all the inputs.

Thx,

-- 
Skip Montanaro ([EMAIL PROTECTED])
http://www.mojam.com/
http://www.musi-cal.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] Cookie pointer.

2000-09-22 Thread Steve Drees

I learned this one the hard way.


Had a python method
id: expireTime
parameters: self
body:
t = self.ZopeTime() + (1.0/192.0) # 7.5 minutes in the future
t = t.toZone('GMT')

return t.strftime("%A, %d-%b-%Y %H:%M:%S GMT")
--

Was trying the following

dtml-call "RESPONSE.setCookie('name', 'value', path='/',
expires=expireTime)"

This does NOT work.

THe following works MUCH better

dtml-call "RESPONSE.setCookie('name', 'value', path='/',
expires=expireTime())"



--
Steve Drees
SysAdmin/Software Developer/Web Geek/Chief Bottle Washer
"A problem well-stated is a problem half-solved."
http://www.christianmp3zone.com/savanna


___
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] HTML Widgets, In-place editing in Zope

2000-09-22 Thread Maik Roeder

Hi Phill !

Phill Hugo wrote:
 widgets is an external method which will be on Zope.org next week if all
 goes well.

Great, it looks very nice ! 
Perhaps this should go into the Zope core sometime/where ?

Best regards,

Maik Röder

-- 
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.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 )