[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ Mmove to ZODB 3.4.1a2. This may repair issue 1822.

2005-06-29 Thread Tim Peters
Log message for revision 30949:
  Mmove to ZODB 3.4.1a2.  This may repair issue 1822.
  

Changed:
  _U  Zope/branches/Zope-2_8-branch/lib/python/
  _U  Zope/branches/Zope-2_8-branch/utilities/

-=-

Property changes on: Zope/branches/Zope-2_8-branch/lib/python
___
Name: svn:externals
   - zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a4/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1

   + zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a4/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1



Property changes on: Zope/branches/Zope-2_8-branch/utilities
___
Name: svn:externals
   - ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a1/src/scripts

   + ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1a2/src/scripts


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] Zope 2.8: ZODB fix breaks undoable_transactions

2005-06-29 Thread yuppie

Hi!


http://svn.zope.org/?view=revrev=30334 changed the behavior of 
undoInfo() in a way that is not backwards compatible. See 
http://www.zope.org/Collectors/Zope/1822 for details.



I can see 3 ways to resolve this:

1.) restoring the old behavior of undoInfo() in ZODB

2.) restoring the old behavior of undoable_transactions()

3.) propagating the change to all the code that depends on 
undoable_transactions()



I don't know all the reasons why undoInfo() was changed, so I don't know 
if reverting the change is an option.


If 1.) is no option, I would prefer solution 2.) over 3.)


Any opinions?

Cheers,

Yuppie

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] 2.8.1 release schedule

2005-06-29 Thread Andreas Jung

Please see:

http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/MilestonePlan

-aj

pgpFGEDVzQK2D.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 2.8: ZODB fix breaks undoable_transactions

2005-06-29 Thread Tim Peters
[yuppie]
 http://svn.zope.org/?view=revrev=30334 changed the behavior of
 undoInfo() in a way that is not backwards compatible.

That's true, or at least off-by-one different than recent ZODB 3.2s.
 Rev 30334 fixed two bugs in the implementation, so that the behavior
matched what the documentation has always said undoInfo() did.  I
don't know when the implementation got out of synch with the docs, but
however people want to resolve this I will not leave the
implementation disagreeing with the docs.

 See http://www.zope.org/Collectors/Zope/1822 for details.

I added details there.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 2.8: ZODB fix breaks undoable_transactions

2005-06-29 Thread yuppie

Hi!


Tim Peters wrote:

[yuppie]


http://svn.zope.org/?view=revrev=30334 changed the behavior of
undoInfo() in a way that is not backwards compatible.



That's true, or at least off-by-one different than recent ZODB 3.2s.
 Rev 30334 fixed two bugs in the implementation, so that the behavior
matched what the documentation has always said undoInfo() did.  I
don't know when the implementation got out of synch with the docs,


AFAICS there were no related changes in App.Undo.UndoSupport or 
undo.dtml within the last 5 years, so I guess the 'broken' behavior 
existed for quite a while and all existing code that uses undoInfo() or 
undoable_transactions() depends on the old behavior.



but
however people want to resolve this I will not leave the
implementation disagreeing with the docs.


Don't know what other people think. I believe restoring the old undoInfo 
behavior and adjusting the documentation would be the best solution. 
Fixing this in undoable_transactions would fork the behavior of both 
methods and fixing all products that depend on the old behavior would 
cause unnecessary trouble.



Cheers,

Yuppie

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 2.8: ZODB fix breaks undoable_transactions

2005-06-29 Thread Tim Peters
[yuppie]
 ...
 Don't know what other people think. I believe restoring the old undoInfo
 behavior and adjusting the documentation would be the best solution.
 Fixing this in undoable_transactions would fork the behavior of both
 methods and fixing all products that depend on the old behavior would
 cause unnecessary trouble.

Can you document the behavior you want?  Because there were multiple
bugs in the implementation before, I'm not exactly sure what old
behavior was in all cases; I'm certain that _some_ of it was purely
accidental, never intended, and utterly surprising (when last  0). 
ZODB/interfaces.py's IStorageUndoable.undoLog documents the current
behavior, which matches what ZODB's UML docs have always claimed
behavior should be.  This behavior is tested in ZODB too now, so any
change here requires fiddling code, docs and tests.  If Zope requires
particular behaviors, it should grow tests for those too.

I'd be happy enough changing `first` and `last` to act like Python
slice indices instead, with the caveat that because there's other
weird non-Python behavior mandated when last  0 (then undo{Log,Info}
are documented as taking the absolute value of `last` as being an
upper bound on the # of results to return -- and old behavior was
related to that, albeit with bugs of its own), they cannot act like
Python slice indices unless `first` and `last` are both non-negative.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 2.8: ZODB fix breaks undoable_transactions

2005-06-29 Thread yuppie

Tim Peters wrote:

[yuppie]


...
Don't know what other people think. I believe restoring the old undoInfo
behavior and adjusting the documentation would be the best solution.
Fixing this in undoable_transactions would fork the behavior of both
methods and fixing all products that depend on the old behavior would
cause unnecessary trouble.



Can you document the behavior you want?  Because there were multiple
bugs in the implementation before, I'm not exactly sure what old
behavior was in all cases; I'm certain that _some_ of it was purely
accidental, never intended, and utterly surprising (when last  0). 
ZODB/interfaces.py's IStorageUndoable.undoLog documents the current

behavior, which matches what ZODB's UML docs have always claimed
behavior should be.  This behavior is tested in ZODB too now, so any
change here requires fiddling code, docs and tests.  If Zope requires
particular behaviors, it should grow tests for those too.

I'd be happy enough changing `first` and `last` to act like Python
slice indices instead, with the caveat that because there's other
weird non-Python behavior mandated when last  0 (then undo{Log,Info}
are documented as taking the absolute value of `last` as being an
upper bound on the # of results to return -- and old behavior was
related to that, albeit with bugs of its own), they cannot act like
Python slice indices unless `first` and `last` are both non-negative.


Zope 2 uses 'undoInfo' only in one place: 'undoable_transactions'. And 
'undoable_transactions' is only used for the undo tab.


CMF uses 'undoable_transactions' in a similar way than Zope 2. The 
problem with the CMF code is that it should work in a consistent way 
with Zope 2.7 and 2.8.


These are the two use cases I'm aware of. Both only use last  0 and 
both expect slicing behavior for positive values, e.g. these conditions 
should be True if we don't change undoable_transactions::


  db.undoInfo(0, 20) == db.undoInfo(0, 99)[0:20]
  db.undoInfo(20, 40) == db.undoInfo(0, 99)[20:40]

I don't care very much *how* this is resolved. All I want is to get the 
regressions in Zope 2 and CMF fixed.


Cheers, Yuppie

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 2.8: ZODB fix breaks undoable_transactions

2005-06-29 Thread Tim Peters
[yuppie]
 ...
 These are the two use cases I'm aware of. Both only use last  0 and
 both expect slicing behavior for positive values, e.g. these conditions
 should be True if we don't change undoable_transactions::

   db.undoInfo(0, 20) == db.undoInfo(0, 99)[0:20]
   db.undoInfo(20, 40) == db.undoInfo(0, 99)[20:40]

I'm willing to change undoInfo to do that; the old UML docs will just
be wrong then.

 I don't care very much *how* this is resolved. All I want is to get the
 regressions in Zope 2 and CMF fixed.

If it continues to be the case that Zope contains no tests verifying
the behavior(s) it relies on, I'll have no way to know whether that
stuff is fixed or not.  ZODB will pass its own tests, but that's not
enough (the ZODB tests have been passing all along).
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] loading an url from a restricted python script

2005-06-29 Thread Andreas Jung



--On 28. Juni 2005 20:40:56 +0200 santiago [EMAIL PROTECTED] wrote:


I don't understand still :
what I am looking for is a way to read a url whitout having to
write an external method.
the point is I belived that reading a url in a web application like zope
should not require such powerfull tool as external methods or dedicated
products..


You *have* to write an external method. dot. point.

-aj



pgp4aWl9u2ygC.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] loading an url from a restricted python script

2005-06-29 Thread Andrew Milton
+---[ Andreas Jung ]--
| 
| 
| --On 28. Juni 2005 20:40:56 +0200 santiago [EMAIL PROTECTED] wrote:
| 
| I don't understand still :
| what I am looking for is a way to read a url whitout having to
| write an external method.
| the point is I belived that reading a url in a web application like zope
| should not require such powerfull tool as external methods or dedicated
| products..
| 
| You *have* to write an external method. dot. point.

As some background to why this is so;

urrlib can read files from your filesystem, and then send them to anywhere on
the internet. Do you really want to allow that by default to anyone that has
access to scripting on your server?

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


[Zope] Re: External editor for ZMI

2005-06-29 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

ken wood wrote:

 I've been following this discussion with some interest as I have never
 been able to get ExternalEditor to work for me. Now, that said, I have
 it confiured enough that it will present me with an editor and a file
 (WinWord) by clicking on the pencil. But I am confused on two points:
 1.) When Word opens a document it presents me with text without any
 formatting. Also gives me metadata, URL, cookie info etc. Is this how it
 is supposed to work?
 2.) When I save the work, I don't know where is goes or how to get it
 back to my plone site.
 Just seems that the documentation gets vague on these issues.
 Looking for some enlightenment.

It sounds as though your browser has invoked WinWord as the helper for
the ExternalEditor stub file, which has the data you describe in it.
You want to associate the EE helper application ('zopeedit.py') with
that mimetype, 'application/x-zope-edit'.

Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCwk74+gerLs4ltQ4RAsSQAJ4iaUoBp3SAGgwenLigJ+g4eADFTgCggAvJ
GM8sBxHOL0t99kbH65J07bU=
=Cgxm
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Sharing global data between threads / locking a method

2005-06-29 Thread Sascha Welter
(Mon, Jun 27, 2005 at 12:00:08PM -0400) [EMAIL PROTECTED] wrote/schrieb/egrapse:
 Message: 9
 Date: Mon, 27 Jun 2005 15:53:38 +0200
 From: Max M [EMAIL PROTECTED]
 Subject: [Zope] Sharing global data between threads / locking a method
 To: zope@zope.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
 I have a synkronisation script that I run every 10 minutes via wget from 
 a cron job.
 
 Sometimes the script runs longer than 10 minutes.
 
 In that case I would like to return a page to wget, but not run the 
 actual script.
 
 So in a external method/module I have a function like this:

Excuse me, but I really believe trying to solve this situation within
Zope is getting at it from the wrong side.

It is so much easier to wrap the call to wget in a shell, python, perl, 
whatever script. Then you can use a simple lockfile to see if another
wget is still running in a copy of the script. It will take you 10
minutes and you will have solved the problem (at least for the use case
of wget being run from the same machine).

As for making a lock inside Zope, I have done this with setting a
property:
if treeroot.hasProperty('currently_parsing'):
treeroot.manage_changeProperties( currently_parsing = True )
else:
treeroot.manage_addProperty('currently_parsing', True, 'boolean')
get_transaction().commit()

For me it never worked inside the SESSION object (for my use case it
does not matter that the session will do the locking only per user).
After I'm done, I do:
treeroot.manage_changeProperties( currently_parsing = False )
get_transaction().commit()

I don't know if this is the proper or cleanest way to do it, but 
It Works(TM).

Regards,

Sascha

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


Re: [Zope] Sequencing pages

2005-06-29 Thread John Poltorak
On Tue, Jun 28, 2005 at 03:45:01PM -0500, J Cameron Cooper wrote:
 John Poltorak wrote:
  If I create individual pages for a website as sub folders of a sites main 
  folder, how do I control the sequence of pages if I automatically generate 
  a set of links to all the folders? I presume that under normal 
  circumstances that sequence would be in alphabetical order of object ID.
 
 The standard folder lists its contents in unspecified order. In 
 practice, it's in order of creation (I think.)

Creation date sequence seems to explain the order I'm seeing.

 
 You can get ordered folders, which support changing the order. In fact, 
 one ships with Zope in recent versions. Look for Folder (Ordered).
 
I've often wondered what 'Folder (Ordered)' was for. 

Is there an example of its usage I can take a look at anywhere? 
 
   --jcc
 -- 
 Building Websites with Plone
 http://plonebook.packtpub.com/
 
 Enfold Systems, LLC
 http://www.enfoldsystems.com


-- 
John


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


[Zope] Calendar for Zope

2005-06-29 Thread John Poltorak

I quite like Plone's Calendar, but need something similar for Zope.

Any recommendations?


-- 
John


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


Re: [Zope] Calendar for Zope

2005-06-29 Thread Peter Bengtsson
The CalendarTag is old and DTML but works pretty well. 
My little CorpCalendar product relys on it.
http://www.zope.org/Members/malikz/CorpCalendar

On 6/29/05, John Poltorak [EMAIL PROTECTED] wrote:
 
 I quite like Plone's Calendar, but need something similar for Zope.
 
 Any recommendations?
 
 
 --
 John
 
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 


-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Calendar for Zope

2005-06-29 Thread Lennart Regebro
On 6/29/05, John Poltorak [EMAIL PROTECTED] wrote:
 I quite like Plone's Calendar, but need something similar for Zope.
 
 Any recommendations?

For those daring to be on the (b)leeding edge, there is CalZope, which
is the non-CMF part of our new calendar project. It's based on Five,
so you'll need Zope 3.0.0 or Zope 2.8.

http://www.cps-project.org/sections/projects/calendar_server
-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problem with ZSQLMethods/MySQL after update

2005-06-29 Thread Andy Dustman
Greg's right: ZMySQLDA-2.0.8 definitely won't work properly with
MySQL-python-1.2.0. You need ZMySQLDA-2.0.9b3.

On 6/29/05, Greg Fischer [EMAIL PROTECTED] wrote:
 I could be totally wrong, but just a thought
 
 You might remove the Zmysqlda 2.0.8 you have and download and install
 the 2.0.9b3.  Do some reading before, and maybe you can simply
 reinstall 2.0.8.  I cant remember what it was that needed 2.0.9, maybe
 it was just having mysqlpython 1.2.0.  (because of mysql 4.1.x or new
 python, cant remember)
 
 Ok I am just thinking outloud now, sorry.  But heck, if it helps. :)
 
 Greg
 
 On 6/28/05, Dieter Maurer [EMAIL PROTECTED] wrote:
  Ragnar Beer wrote at 2005-6-27 18:50 +0200:
  After upgrading Zope from version 2.6.4 to 2.8.0 and mysqlpython from 
  0.9.2 to
  1.2.0 I cannot add or edit ZSQLMethods anymore, although there is an open
  (MySQL)db-Connection that works just fine with the same ZSQLMethods that 
  cannot
  be edited or with external methods. The error I'm getting is:
  
  There are no SQL database connections. You need to add a Zope SQL database
  connection before you can edit a Zope SQL Method.
 
  Almost surely, your ZMySQLDA instances are broken (and then
  do not behave as SQL database connection instances).
 
  Check your Zope logfile for messages of the form
  could not install product
 
  --
  Dieter
  ___
  Zope maillist  -  Zope@zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
 
 
 
 --
 Greg Fischer
 1st Byte Solutions
 http://www.1stbyte.com
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 


-- 
Computer interfaces should never be made of meat.
http://www.terrybisson.com/meat.html
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Calendar for Zope

2005-06-29 Thread John Poltorak
On Wed, Jun 29, 2005 at 01:15:39PM +0200, Lennart Regebro wrote:
 On 6/29/05, John Poltorak [EMAIL PROTECTED] wrote:
  I quite like Plone's Calendar, but need something similar for Zope.
  
  Any recommendations?
 
 For those daring to be on the (b)leeding edge, there is CalZope, which
 is the non-CMF part of our new calendar project. It's based on Five,
 so you'll need Zope 3.0.0 or Zope 2.8.
 
 http://www.cps-project.org/sections/projects/calendar_server

Sounds interesting...

Is CPS something like an alternative to Plone?

I've only just struggled to upgrade to Zope 2.7.3 so jumping to 2.8 fills 
me with some degree of trepidation. I'd have to be convinced that this 
calendar server was exactly what I was looking for. Is there a usable 
demo?


 -- 
 Lennart Regebro, Nuxeo http://www.nuxeo.com/
 CPS Content Management http://www.cps-project.org/

-- 
John


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


Re: [Zope] 2.5.1 to 2.8.0

2005-06-29 Thread Tim Suter

 Just FYI, having another webserver do authentication and making that  
 work nicely with Zope Sucks with a Capital S. Most of the time there  
 is no valid reason to go that route, other than the lame excuse but  
 we only know it this way.

I am sure that is why I am told to use Apache instead of LDAPUserFolder.
There is very little documentation, very little, in regards to Apache
authentication methods.  There seems to be quite a bit of documentation
in regards to LDAPUserFolder.  I inherited this project of upgrading and
the guy who initially set up 2.5.1 is no longer here for reference.  

Tim

 Requests for Zope should be proxied/rewritten through and Zope can do  
 the authentication itself. If mod_authzldap works, LDAPUserFolder  
 will work fine as well.
 
 jens
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

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


Re: [Zope] Sequencing pages

2005-06-29 Thread J Cameron Cooper

John Poltorak wrote:

On Tue, Jun 28, 2005 at 03:45:01PM -0500, J Cameron Cooper wrote:


John Poltorak wrote:

If I create individual pages for a website as sub folders of a sites main 
folder, how do I control the sequence of pages if I automatically generate 
a set of links to all the folders? I presume that under normal 
circumstances that sequence would be in alphabetical order of object ID.


The standard folder lists its contents in unspecified order. In 
practice, it's in order of creation (I think.)



Creation date sequence seems to explain the order I'm seeing.

You can get ordered folders, which support changing the order. In fact, 
one ships with Zope in recent versions. Look for Folder (Ordered).
 
I've often wondered what 'Folder (Ordered)' was for. 

Is there an example of its usage I can take a look at anywhere? 


Make one on your box and look at it. It's not like you can't just delete it.

--jcc

--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] TAL and Javascript

2005-06-29 Thread Rob Boyd
I'm stuck this, and would appreciate help or pointers.

I have a form with 2 selection drop-downs. I want the user's choice of
select 1 to drive the options displayed in select 2. When the user
makes a selection in select 1, onChange calls a Javascript function
that should write select 2 options based on the result of a call to a
Python script, passing the select 1 choice as an argument to the Python
script.

But: I cannot get the Javascript var into the namespace that the TALES
expression knows about.

Example:

script
function makeDropDown() {
  var widget = document.getElementById('select1');
  var choice = widget.options[widget.selectedIndex].value;
  var data = [result of calling Python script 'foo(arg)' with
arg=choice]
  // create options for select 2
}
/script
[various html...]
select id=select1 onChange=makeDropDown()
[options...]
/select

I've tried with multiple scripts, where one has tal:content=... but
cannot figure out how the TALES expression can get at what my
javascript gets from an event. I haven't done much with JavaScript
inside Page Templates, so perhaps I'm going about this all wrong.

TIA,
Rob




__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL and Javascript

2005-06-29 Thread Peter Bengtsson
What I do when the javascript gets too hairy is to stick it in a DTML
Method and then do something like this::

script type=text/javascript tal:content=structure
here/the_script_dtml/script
or
script type=text/javascript tal:content=structure
python:here.the_script_dtml(here, request, parameterX='Y')/script

On 6/29/05, Rob Boyd [EMAIL PROTECTED] wrote:
 I'm stuck this, and would appreciate help or pointers.
 
 I have a form with 2 selection drop-downs. I want the user's choice of
 select 1 to drive the options displayed in select 2. When the user
 makes a selection in select 1, onChange calls a Javascript function
 that should write select 2 options based on the result of a call to a
 Python script, passing the select 1 choice as an argument to the Python
 script.
 
 But: I cannot get the Javascript var into the namespace that the TALES
 expression knows about.
 
 Example:
 
 script
 function makeDropDown() {
   var widget = document.getElementById('select1');
   var choice = widget.options[widget.selectedIndex].value;
   var data = [result of calling Python script 'foo(arg)' with
 arg=choice]
   // create options for select 2
 }
 /script
 [various html...]
 select id=select1 onChange=makeDropDown()
 [options...]
 /select
 
 I've tried with multiple scripts, where one has tal:content=... but
 cannot figure out how the TALES expression can get at what my
 javascript gets from an event. I haven't done much with JavaScript
 inside Page Templates, so perhaps I'm going about this all wrong.
 
 TIA,
 Rob
 
 
 
 
 __
 Discover Yahoo!
 Stay in touch with email, IM, photo sharing and more. Check it out!
 http://discover.yahoo.com/stayintouch.html
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 


-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL and Javascript

2005-06-29 Thread Lennart Regebro
On 6/29/05, Rob Boyd [EMAIL PROTECTED] wrote:
 But: I cannot get the Javascript var into the namespace that the TALES
 expression knows about.

TALES are executed on the server, when the template is rendered.
Javascript is executed on the client after the template has rendered,
and hence, well after the TALES have been executed.

So, no you can't do that without making a new roundtrip to the server.
You have two options: Either use the Javascripts onClick to make an
XML call to the server to fetch the new data (not trivial) or send all
the data from the start.

This last thing is what almost all sites do with all that type of
Javascript functionality.

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL and Javascript

2005-06-29 Thread J Cameron Cooper

Rob Boyd wrote:

I'm stuck this, and would appreciate help or pointers.

I have a form with 2 selection drop-downs. I want the user's choice of
select 1 to drive the options displayed in select 2. When the user
makes a selection in select 1, onChange calls a Javascript function
that should write select 2 options based on the result of a call to a
Python script, passing the select 1 choice as an argument to the Python
script.

But: I cannot get the Javascript var into the namespace that the TALES
expression knows about.

Example:

script
function makeDropDown() {
  var widget = document.getElementById('select1');
  var choice = widget.options[widget.selectedIndex].value;
  var data = [result of calling Python script 'foo(arg)' with
arg=choice]


This is impossible, at least in a single request. You are trying to mix 
server-side and client-side actions.


You would have to make a new request on the server with the contents of 
'choice' in order to get it processed. This can be done with XML-RPC or 
some other options; look up 'AJAX' to get a feel for this.


Alternately, if you have a known list of values for 'choice' you could 
generate all the 'data' values for each 'choice' value, encode them in 
the page's javascript, and look them up client-side.


--jcc

--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL and Javascript

2005-06-29 Thread David H

Rob,
As others have pointed out the approach you indicate will not work.
To summarize -
Write python script to dynamically create JAVASCRIPT code (you can 
format javascript arrays of data from your db this way). 


Then, using TAL load it in, eg
head
tal:js replace=structure 
here/python/pythonThatCreatedJavaScriptjavascript here/tal:js

/head

Which is then callable from the other javascript routines in your page.

David



Rob Boyd wrote:


I'm stuck this, and would appreciate help or pointers.

I have a form with 2 selection drop-downs. I want the user's choice of
select 1 to drive the options displayed in select 2. When the user
makes a selection in select 1, onChange calls a Javascript function
that should write select 2 options based on the result of a call to a
Python script, passing the select 1 choice as an argument to the Python
script.

But: I cannot get the Javascript var into the namespace that the TALES
expression knows about.

Example:

script
function makeDropDown() {
 var widget = document.getElementById('select1');
 var choice = widget.options[widget.selectedIndex].value;
 var data = [result of calling Python script 'foo(arg)' with
arg=choice]
 // create options for select 2
}
/script
[various html...]
select id=select1 onChange=makeDropDown()
[options...]
/select

I've tried with multiple scripts, where one has tal:content=... but
cannot figure out how the TALES expression can get at what my
javascript gets from an event. I haven't done much with JavaScript
inside Page Templates, so perhaps I'm going about this all wrong.

TIA,
Rob







___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] WebDAV

2005-06-29 Thread Dieter Maurer
Luiz Fernando B. Ribeiro wrote at 2005-6-29 01:19 -0300:
 ...
The login dialog is show but even with my manager password it's not able 
to login. The error message above is repeated after each atempt.

This is a more precise problem description :-)

I analyse such problems with a TCP logger (my favorite one
is Shane's tcpwatch). It allows you to verify whether the
problem is the server or the client.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] TAL and Javascript

2005-06-29 Thread Rob Boyd
Thanks to all the responders. It gave me some ideas, but alas no luck.

To clarify, I am not trying to do everything in one request. Request
one generates the page, a user event (selecting an option from a form)
fires another request via javascript.

like:
script tal:content=python:'function getFormats() {
var widget = document.getElementById('orgs');
var chosen_org = widget.options[widget.selectedIndex].value;
var formats = %s;
// build selection 2 options from formats
' % here.getDataFormats(chosen_org) /

And then a user event (onChange) calls getFormats.

Even with generating the script with a Python script or DTML, the
problem remains (for me at least) to get a value from the DOM passed as
an argument to a Python script that queries my database. If my Python
script didn't take an argument, I'd have no problem. I could do this
and use javascript to build the select options from the appropriate
values. But I'd like to cut down on what the browser has to handle.
What the user chooses in the first selection can reduce what they get
to choose in selection two from 3000 choices to hundreds. I'd prefer to
have the backend reduce the result set rather than having the browser
do the work.

I thought about AJAX (no experience), but given time constraints, looks
like I'll have to load everything on the page and go from there.

Rob



 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL and Javascript

2005-06-29 Thread J Cameron Cooper

Rob Boyd wrote:

Thanks to all the responders. It gave me some ideas, but alas no luck.

To clarify, I am not trying to do everything in one request. Request
one generates the page, a user event (selecting an option from a form)
fires another request via javascript.


I do not see it creating another request. I see a DOM event. DOM events 
do not touch the server.



like:
script tal:content=python:'function getFormats() {
var widget = document.getElementById('orgs');
var chosen_org = widget.options[widget.selectedIndex].value;
var formats = %s;
// build selection 2 options from formats
' % here.getDataFormats(chosen_org) /

And then a user event (onChange) calls getFormats.

Even with generating the script with a Python script or DTML, the
problem remains (for me at least) to get a value from the DOM passed as
an argument to a Python script that queries my database.


Again, as I understand you, this is impossible.

Zope has no access to the DOM. Only to request parameters. This simply 
cannot work. ZPT can only insert values during page rendering, and the 
value for 'chosen_org' is decided after the page is rendered and in a 
browser. Unless you can invent a special time-traveling Javascript, this 
cannot work.


What would work is::

 script tal:content=python:'function getFormats() {
 var widget = document.getElementById('orgs');
 var chosen_org = widget.options[widget.selectedIndex].value;
 var formats = xmlrpcserver.getDataFormats(chosen_org);' /

This would actually create another request to Zope, running a script 
with you're dynamically generated value. Note: I don't know how xml-rpc 
is done in JavaScript, so I just made something up. Presumably 
'xmlrpcserver' is a handle on your Zope server. Also note that every 
time someone fires off this method, it's a request to the server.


(Also note: it doesn't have to be XML-RPC, just some way of asking the 
server. There are various methods used for this.)


You might also make the widget that you chose from be part of a form, 
and when a value is chosen, the form is submitted. This will get the 
'chosen_org' in a request, and your template can then render your second 
select list with the values from::


  'here.getDataFormats(request.chosen_org)'

This is the common 'old-school' way of doing this.

--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL and Javascript

2005-06-29 Thread Jonathan


- Original Message - 
From: Rob Boyd [EMAIL PROTECTED]

Thanks to all the responders. It gave me some ideas, but alas no luck.



Even with generating the script with a Python script or DTML, the
problem remains (for me at least) to get a value from the DOM passed as
an argument to a Python script that queries my database. If my Python
script didn't take an argument, I'd have no problem. I could do this
and use javascript to build the select options from the appropriate
values. But I'd like to cut down on what the browser has to handle.
What the user chooses in the first selection can reduce what they get
to choose in selection two from 3000 choices to hundreds. I'd prefer to
have the backend reduce the result set rather than having the browser
do the work.


We do this a lot... a few key concepts to get you going:

1) You can embed dtml tags  within javascript, eg:
 hiddenframe.location.href = 'dtml-var 
baseurlSub_GetPresentorPage?confid=dtml-var login_idSessUpd=1'


This allows you to write scripts which generate javascript code that is 
specific to the situation (when zope processes the dtml tags, the tags will 
be replaced with 'data' which then becomes part of the javascript code).



2) You can set javascript variables from dtml/scripts, eg:

   parent.presentorpage= 'dtml-var 
temp_folder.getProperty(confid+'_CurrSlide')'


This allows you to store zope objects/fields/etc in variables that 
javascript can then use.



3) We use hidden html frames to provide a location that javascript can 
reload in order to make 'invisible' (not really, but close enough) calls 
from the browser to the server



hth

Jonathan



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Calendar for Zope

2005-06-29 Thread Bakhtiar A Hamid
On 6/29/05, John Poltorak [EMAIL PROTECTED] wrote:
 
 I quite like Plone's Calendar, but need something similar for Zope.
 
 Any recommendations?

just like peterb's corpcalendar, SempoiCalendar also depends on
CalendarTag.  and an rdb

it;s old, at v 0.0.0, but works for me.

ymmv

http://zope.org/Members/kedai/SempoiCalendar

 
 
 --
 John
 
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 


-- 
http://myzope.kedai.com.my - my-zope org
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )