[Zope-Checkins] Re: SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/Publi - Checkpoint before I dig into refactoring BaseRequest.py and Publish.py

2005-12-13 Thread Sidnei da Silva
On Tue, Dec 13, 2005 at 12:31:54PM +0100, Philipp von Weitershausen wrote:
| Sidnei da Silva wrote:
|  Log message for revision 40742:
|
|- Checkpoint before I dig into refactoring BaseRequest.py and Publish.py
|
|  
|  Changed:
|A   
Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
| 
| I suggest following Zope 3's package-and-module naming convention (lower
| case) for all the files we add to Zope 2 from now on.

IMHO, that is silly if we are adding new modules to existing packages. For new
packages I agree.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] Re: SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/Publi - Checkpoint before I dig into refactoring BaseRequest.py and Publish.py

2005-12-13 Thread Philipp von Weitershausen
Sidnei da Silva wrote:
 On Tue, Dec 13, 2005 at 12:31:54PM +0100, Philipp von Weitershausen wrote:
 | Sidnei da Silva wrote:
 |  Log message for revision 40742:
 |
 |- Checkpoint before I dig into refactoring BaseRequest.py and Publish.py
 |
 |  
 |  Changed:
 |A   
 Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
 | 
 | I suggest following Zope 3's package-and-module naming convention (lower
 | case) for all the files we add to Zope 2 from now on.
 
 IMHO, that is silly if we are adding new modules to existing packages. For new
 packages I agree.

I disagree, but maybe that's just me. :)
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ The SiteErrorLog now copies exceptions to the event log by default

2005-12-13 Thread Florent Guillaume
Log message for revision 40764:
  The SiteErrorLog now copies exceptions to the event log by default

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
  U   
Zope/branches/Zope-2_8-branch/lib/python/Products/SiteErrorLog/SiteErrorLog.py

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-12-13 16:01:06 UTC 
(rev 40763)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-12-13 16:31:53 UTC 
(rev 40764)
@@ -66,6 +66,8 @@
 
 Other
 
+  - The SiteErrorLog now copies exceptions to the event log by default.
+
   - ObjectManager now has an hasObject method to test presence. This
 brings it in line with BTreeFolder.
 

Modified: 
Zope/branches/Zope-2_8-branch/lib/python/Products/SiteErrorLog/SiteErrorLog.py
===
--- 
Zope/branches/Zope-2_8-branch/lib/python/Products/SiteErrorLog/SiteErrorLog.py  
2005-12-13 16:01:06 UTC (rev 40763)
+++ 
Zope/branches/Zope-2_8-branch/lib/python/Products/SiteErrorLog/SiteErrorLog.py  
2005-12-13 16:31:53 UTC (rev 40764)
@@ -71,7 +71,7 @@
 id = 'error_log'
 
 keep_entries = 20
-copy_to_zlog = 0
+copy_to_zlog = True
 
 security = ClassSecurityInfo()
 

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


[Zope-Checkins] SVN: Zope/branches/2.9/ The SiteErrorLog now copies exceptions to the event log by default

2005-12-13 Thread Florent Guillaume
Log message for revision 40765:
  The SiteErrorLog now copies exceptions to the event log by default

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  U   Zope/branches/2.9/lib/python/Products/SiteErrorLog/SiteErrorLog.py

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===
--- Zope/branches/2.9/doc/CHANGES.txt   2005-12-13 16:31:53 UTC (rev 40764)
+++ Zope/branches/2.9/doc/CHANGES.txt   2005-12-13 16:34:01 UTC (rev 40765)
@@ -39,7 +39,7 @@
 
 Features added
 
- - none, feature freeze :-)
+ - The SiteErrorLog now copies exceptions to the event log by default.
 
   Zope 2.9.0 beta 1 (2005/12/06)
 

Modified: Zope/branches/2.9/lib/python/Products/SiteErrorLog/SiteErrorLog.py
===
--- Zope/branches/2.9/lib/python/Products/SiteErrorLog/SiteErrorLog.py  
2005-12-13 16:31:53 UTC (rev 40764)
+++ Zope/branches/2.9/lib/python/Products/SiteErrorLog/SiteErrorLog.py  
2005-12-13 16:34:01 UTC (rev 40765)
@@ -71,7 +71,7 @@
 id = 'error_log'
 
 keep_entries = 20
-copy_to_zlog = 0
+copy_to_zlog = True
 
 security = ClassSecurityInfo()
 

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


[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ - Another checkpoint. Enough majik to render the quickstart page, not much else.

2005-12-13 Thread Sidnei da Silva
Log message for revision 40775:
  
  - Another checkpoint. Enough majik to render the quickstart page, not much 
else.
  

Changed:
  _U  Zope/branches/publication-refactor/lib/python/
  U   Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml
  U   Zope/branches/publication-refactor/lib/python/Products/Five/meta.zcml
  U   Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
  U   Zope/branches/publication-refactor/lib/python/Zope2/Startup/__init__.py
  U   Zope/branches/publication-refactor/lib/python/Zope2/Startup/handlers.py
  U   Zope/branches/publication-refactor/lib/python/Zope2/Startup/zopeschema.xml

-=-

Property changes on: Zope/branches/publication-refactor/lib/python
___
Name: svn:externals
   - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/BTrees
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ZopeUndo
zdaemon-r 39732 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz
zodbcode   -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode
ClientCookie   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientCookie
mechanize  -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize

   + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/BTrees
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b4/src/ZopeUndo
zdaemon-r 39732 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz
zodbcode   -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode
ClientCookie   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientCookie
mechanize  -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize
twisted
svn://svn.twistedmatrix.com/svn/Twisted/branches/releases/2.1.x/twisted


Modified: 
Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml
===
--- Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml  
2005-12-13 17:56:02 UTC (rev 40774)
+++ Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml  
2005-12-14 00:10:45 UTC (rev 40775)
@@ -15,6 +15,14 @@
   include package=zope.app.event /
   include package=zope.app.traversing /
 
+  publisher
+  name=Zope2-HTTP
+  factory=ZPublisher.Publication.Zope2HTTPFactory
+  methods=*
+  mimetypes=*
+  priority=0
+  /
+
   !-- do 'traditional' traversing by default; needed by ZPT --
   adapter
   for=*

Modified: Zope/branches/publication-refactor/lib/python/Products/Five/meta.zcml
===
--- Zope/branches/publication-refactor/lib/python/Products/Five/meta.zcml   
2005-12-13 17:56:02 UTC (rev 40774)
+++ Zope/branches/publication-refactor/lib/python/Products/Five/meta.zcml   
2005-12-14 00:10:45 UTC (rev 40775)
@@ -172,4 +172,7 @@
   !-- load the i18n:registerTranslations directive --
   include package=zope.app.i18n file=meta.zcml /
 
+  !-- load the zope:publisher directive --
+  include package=zope.app.publication file=meta.zcml /
+
 /configure

Modified: 
Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
===
--- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 
2005-12-13 17:56:02 UTC (rev 40774)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 
2005-12-14 00:10:45 UTC (rev 40775)
@@ -12,14 +12,22 @@
 ##
 __version__='$Revision$'[11:-2]
 
+import re
 import sys
 import transaction
+
 from zope.event import notify
+from zope.component import queryUtility
 from zope.interface import implements
 from zope.publisher.interfaces import 

Re: [Zope-dev] RFV: Unicode in Zope 2

2005-12-13 Thread Martijn Faassen

Jim Fulton wrote:

I forgot a very important need:

- Common approach to Unicode

In particular, In Zope 3, all text is stored and managed as Unicode.
The publisher decodes request data and encodes response data.  The vast
majority of application and library code can ignore encoding issues.
(The exceptions are applications and frameworks that need to exhange
text with non-Unicode-aware external systems.)  This has provided
great simplifications and allowed us to avoid common pitfals from
mixing Unicode and encoded text.

We need to migrate Zope 2 to use a similar strategy.  We need volunteers
to brainstorm how this can be done and make one or more proposals.
This is likely a prerequisite for finishing the publisher and ZPT
work.


This is definitely a scary topic, and I speak from years of experience 
with Zope 2 unicode here. This sounds like a very hard transition that 
would touch *a lot* of code in non-Zope 2 core. How do you envision all 
the form inputs to suddenly produce unicode strings, for instance?


We've struggled hard with Formulator to make it work with unicode for 
instance (and still it's buggy, as I wanted to support the non-unicode 
scenarios too). I can imagine any system in Zope that uses forms at all 
would need to be touched.


I'll volunteer to help brainstorm on this, but right now my brainstorm 
is only very dark and full of lightning.


Anyway, in some basics, Zope 2 does have an approach to unicode for 
*output* that's fairly similar to Zope 3's: if you use unicode strings 
your entire output (including page templates) will be unicode (if you 
don't mix with non-unicode non-ascii strings..). Then the response 
encoding setting is read and everything is transformed once to unicode 
text. Silva uses this. It also struggles to make sure all its input is 
transformed to unicode (among other ways using Formulator).


In Plone, the situation is quite different -- its 
PlacelessTranslationService monkeypatches into the page template engine 
and puts in ways so that you can mix UTF-8 and unicode strings together. 
This then goes on to break assumptions of code that uses the page 
template engine in a unicode-pure environment (which is what happened to 
Silva).


Regards,

Martijn
___
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] RFV: Unicode in Zope 2

2005-12-13 Thread Jim Fulton

Martijn Faassen wrote:

Jim Fulton wrote:


I forgot a very important need:

- Common approach to Unicode

In particular, In Zope 3, all text is stored and managed as Unicode.
The publisher decodes request data and encodes response data.  The vast
majority of application and library code can ignore encoding issues.
(The exceptions are applications and frameworks that need to exhange
text with non-Unicode-aware external systems.)  This has provided
great simplifications and allowed us to avoid common pitfals from
mixing Unicode and encoded text.

We need to migrate Zope 2 to use a similar strategy.  We need volunteers
to brainstorm how this can be done and make one or more proposals.
This is likely a prerequisite for finishing the publisher and ZPT
work.



This is definitely a scary topic, and I speak from years of experience 
with Zope 2 unicode here. This sounds like a very hard transition that 
would touch *a lot* of code in non-Zope 2 core. How do you envision all 
the form inputs to suddenly produce unicode strings, for instance?


We've struggled hard with Formulator to make it work with unicode for 
instance (and still it's buggy, as I wanted to support the non-unicode 
scenarios too). I can imagine any system in Zope that uses forms at all 
would need to be touched.


I'll volunteer to help brainstorm on this, but right now my brainstorm 
is only very dark and full of lightning.


You and I brainstormed this a few months ago.  I think this was on the
list.  I think that, for starters, we would arrange that all Zope 3
views used in Zope 2 would get unicode input.  If you like, I can try
to find this discussion. :)

Anyway, in some basics, Zope 2 does have an approach to unicode for 
*output* that's fairly similar to Zope 3's: if you use unicode strings 
your entire output (including page templates) will be unicode (if you 
don't mix with non-unicode non-ascii strings..). Then the response 
encoding setting is read and everything is transformed once to unicode 
text. Silva uses this. It also struggles to make sure all its input is 
transformed to unicode (among other ways using Formulator).


In Plone, the situation is quite different -- its 
PlacelessTranslationService monkeypatches into the page template engine 
and puts in ways so that you can mix UTF-8 and unicode strings together. 
This then goes on to break assumptions of code that uses the page 
template engine in a unicode-pure environment (which is what happened to 
Silva).


Ick.

I'm not suggesting this is easy.  We may have some messy deprecation
and backward compatibility code.  But we *do* need to solve this problem
eventually, and the solution doesn't get any closer without taking steps.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
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] Question about start using ZServerSSL on win box...

2005-12-13 Thread Thomas G. Apostolou
Hello all,

I have build M2Crypto.0.15 version on a win xp box recently and was reading
ZServerSSL HOWTO
http://www.zope.org/Members/ngps/ZServerSSL-HOWTO
document so that i can start using https,
xmlprc-over-https etc.

I have to tell that i have installed from Plone 2.0.5 binary for windows
witch comes with Zope 2.7.0 and Python 2.3.3 (i have patched
SimpleHTTPServer.py as corrected for 2.3.5).
É also have to tell that i have installed so that Zope server runs as a
service...

As reading ZServerSSL HOWTO i suppose that the corresponding $ZOPE is
my C:\Program Files\Plone 2\Zope\lib\python because only there i can find
$ZOPE/ZServer. Correct me if i am wrong with this...

What i also need to know is that since i have installed so that Zope server
runs as a service what is the corresponding steps for me in the section
where you say :

  1.. Copy $ZSSL/z2s.py into $ZOPE.

  2.. Depending on your operating system, modify $ZOPE/start or
$ZOPE/start.bat to invoke $ZOPE/z2s.py, instead of $ZOPE/z2.py. The files
$ZSSL/starts and $ZSSL/starts.bat serve as examples.

I do not have any $ZOPE/start or $ZOPE/start.bat or $ZOPE/z2.py, i only have
a file named PythonService.exe into C:\Program Files\Plone 2\Zope\bin

Do i HAVE to reinstall Plone and set it not to run as service?

Thank you in advance...

Thomas G. Apostolou



___
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: Question about start using ZServerSSL on win box...

2005-12-13 Thread Thomas G. Apostolou
After reading and searching for a while i found that all about running
ZService as service start from C:\Program Files\Plone
2\Data\bin\zopeservice.py
But still i cannot fully understand where the server is called so that i
replace it with z2s.py or what ever needed...
Any ideas?


Thomas G. Apostolou [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello all,

 I have build M2Crypto.0.15 version on a win xp box recently and was
reading
 ZServerSSL HOWTO
 http://www.zope.org/Members/ngps/ZServerSSL-HOWTO
 document so that i can start using https,
 xmlprc-over-https etc.

 I have to tell that i have installed from Plone 2.0.5 binary for windows
 witch comes with Zope 2.7.0 and Python 2.3.3 (i have patched
 SimpleHTTPServer.py as corrected for 2.3.5).
 É also have to tell that i have installed so that Zope server runs as a
 service...

 As reading ZServerSSL HOWTO i suppose that the corresponding $ZOPE is
 my C:\Program Files\Plone 2\Zope\lib\python because only there i can
find
 $ZOPE/ZServer. Correct me if i am wrong with this...

 What i also need to know is that since i have installed so that Zope
server
 runs as a service what is the corresponding steps for me in the section
 where you say :

   1.. Copy $ZSSL/z2s.py into $ZOPE.

   2.. Depending on your operating system, modify $ZOPE/start or
 $ZOPE/start.bat to invoke $ZOPE/z2s.py, instead of $ZOPE/z2.py. The files
 $ZSSL/starts and $ZSSL/starts.bat serve as examples.

 I do not have any $ZOPE/start or $ZOPE/start.bat or $ZOPE/z2.py, i only
have
 a file named PythonService.exe into C:\Program Files\Plone 2\Zope\bin

 Do i HAVE to reinstall Plone and set it not to run as service?

 Thank you in advance...

 Thomas G. Apostolou



 ___
 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 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] buildbot failure in Zope trunk 2.4 Linux zc-buildbot

2005-12-13 Thread buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 2213
Blamelist: andreasjung,efge

BUILD FAILED: failed test

sincerely,
 -The Buildbot

___
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] RFV: Unicode in Zope 2

2005-12-13 Thread Martijn Faassen

Jim Fulton wrote:

Martijn Faassen wrote:

[snip]
I'll volunteer to help brainstorm on this, but right now my brainstorm 
is only very dark and full of lightning.



You and I brainstormed this a few months ago.  I think this was on the
list.  I think that, for starters, we would arrange that all Zope 3
views used in Zope 2 would get unicode input.  If you like, I can try
to find this discussion. :)



Ah, right, that is far less scary, indeed. Your post somehow gave me the 
impression you wanted to change the way current Zope 2 does things, but 
if you limit yourself to what happens with Zope 3 stuff in Zope 2, it's 
less scary.


In fact Five already has hacks to make sure that unicode enters 
Five-generated forms. Replacing these hacks with something solid would 
be good.


Anyway, in some basics, Zope 2 does have an approach to unicode for 
*output* that's fairly similar to Zope 3's: if you use unicode strings 
your entire output (including page templates) will be unicode (if you 
don't mix with non-unicode non-ascii strings..). Then the response 
encoding setting is read and everything is transformed once to unicode 
text. Silva uses this. It also struggles to make sure all its input is 
transformed to unicode (among other ways using Formulator).


In Plone, the situation is quite different -- its 
PlacelessTranslationService monkeypatches into the page template 
engine and puts in ways so that you can mix UTF-8 and unicode strings 
together. This then goes on to break assumptions of code that uses the 
page template engine in a unicode-pure environment (which is what 
happened to Silva).


Ick.

I'm not suggesting this is easy.  We may have some messy deprecation
and backward compatibility code.  But we *do* need to solve this problem
eventually, and the solution doesn't get any closer without taking steps.


Yes. I'm optimistic about being able to do this for Five-related stuff. 
If this is eventually going to be people's main development system, then 
we can basically say we've solved the important unicode issues.


What I'm worried about doing this for old code, but some steps will 
probably become clear during the brainstorming session. Migration tools 
that turn strings in the ZODB into unicode ones magically (with the 
ability to spell out exceptions and encoding)? Tricky...


Regards,

Martijn

___
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: RFV: Unicode in Zope 2

2005-12-13 Thread Florent Guillaume

Martijn Faassen wrote:

Jim Fulton wrote:


Martijn Faassen wrote:


[snip]

I'll volunteer to help brainstorm on this, but right now my 
brainstorm is only very dark and full of lightning.




You and I brainstormed this a few months ago.  I think this was on the
list.  I think that, for starters, we would arrange that all Zope 3
views used in Zope 2 would get unicode input.  If you like, I can try
to find this discussion. :)



Ah, right, that is far less scary, indeed. Your post somehow gave me the 
impression you wanted to change the way current Zope 2 does things, but 
if you limit yourself to what happens with Zope 3 stuff in Zope 2, it's 
less scary.


In fact Five already has hacks to make sure that unicode enters 
Five-generated forms. Replacing these hacks with something solid would 
be good.


Anyway, in some basics, Zope 2 does have an approach to unicode for 
*output* that's fairly similar to Zope 3's: if you use unicode 
strings your entire output (including page templates) will be unicode 
(if you don't mix with non-unicode non-ascii strings..). Then the 
response encoding setting is read and everything is transformed once 
to unicode text. Silva uses this. It also struggles to make sure all 
its input is transformed to unicode (among other ways using Formulator).


In Plone, the situation is quite different -- its 
PlacelessTranslationService monkeypatches into the page template 
engine and puts in ways so that you can mix UTF-8 and unicode strings 
together. This then goes on to break assumptions of code that uses 
the page template engine in a unicode-pure environment (which is what 
happened to Silva).



Ick.

I'm not suggesting this is easy.  We may have some messy deprecation
and backward compatibility code.  But we *do* need to solve this problem
eventually, and the solution doesn't get any closer without taking steps.



Yes. I'm optimistic about being able to do this for Five-related stuff. 
If this is eventually going to be people's main development system, then 
we can basically say we've solved the important unicode issues.


What I'm worried about doing this for old code, but some steps will 
probably become clear during the brainstorming session. Migration tools 
that turn strings in the ZODB into unicode ones magically (with the 
ability to spell out exceptions and encoding)? Tricky...


I'd start by adding some deprecation warnings at the places where 
PlacelessTranslationService (or Localizer for that matter) do their 
workarounds so that normally incompatible types are mixed together.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] File is not Contained

2005-12-13 Thread Thomas Lotze
Hi,

I noticed that zope.app.file.File does not inherit from
zope.app.container.contained.Contained. This does not stop a file from,
e.g., getting added to a folder (and the File type does appear in the
ZMI add menu). It does, however, stop you from getting at the File's
parent. Currently, File cannot be used as a proper content type, though it
looks like it is supposed to be one.

IMO File should inherit from Contained; am I wrong for some reason, or is
this an issue that should be fixed? If the latter, I'd look into it.

-- 
Thomas

___
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] Re: just curious: zope and ingres

2005-12-13 Thread Vlada Macek
[At 13.12.2005 01:17, Alexander Limi kindly sent the following quotation.]

 On Mon, 12 Dec 2005 08:33:25 -0800, Sascha Ottolski
 [EMAIL PROTECTED] wrote:

 I remembered reading about the plans to create RDBMS integration as
 alternative to ZODB about 1,5 years ago:

 http://www.zope.com/about_us/press_releases/ca_and_zope.html

 Doesn't seem to be alive anymore, right?

 CA seems to have dropped both Ingres and their involvement with Zope,
 so I believe that would be right, yes.

What a surprise when the people involved are not willing to proof-read
at least the title of the annoucements they make. };-]


-- 

\//\/\
(Sometimes credited as 1494 F8DD 6379 4CD7 E7E3 1FC9 D750 4243 1F05 9424.)

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

2005-12-13 Thread Rakotomandimby Mihamina
I'm running zope 2.8.3, python 2.3.5 and CPS SVN trunk.
I update CPS and get this traceback:

Traceback (innermost last):
  *   Module ZPublisher.Publish, line 113, in publish
  *   Module ZPublisher.mapply, line 88, in mapply
  *   Module ZPublisher.Publish, line 40, in call_object
  *   Module Products.ExternalMethod.ExternalMethod, line 229, in
__call__
__traceback_info__: ((CPSDefaultSite at /dedie, None, 0,
'portlets'), {}, (None, 0, 'portlets'))
AttributeError: _v_func_code

So that I could not update my CPS.
I have no more messages.
What could I do? I must update that CPS site...

-- 
A powerfull GroupWare, CMS, CRM, ECM: CPS (Open Source  GPL).
Opengroupware, SPIP, Plone, PhpBB, JetSpeed... are good: CPS is better.
http://www.cps-project.org for downloads  documentation.
Free hosting of CPS groupware: http://www.objectis.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] zope and LDAP for authorisation

2005-12-13 Thread Marinussen, M.J. (Ria)
Hi Jens,

  Hi,
 
  I'm looking for a zope product that enables me to use our Active
  Directory LDAP server for verification of login credentials only.
  I want users still stored in Zope, and access to 
 directories should be
  also something I can handle in Zope, and I don't want to use LDAP  
  groups
  because I don't control the LDAP server and there are no 
 groups on the
  LDAP server I can use.
 
  So really, all I want is that Zope checks the passwords 
 with the LDAP
  server instead of with it's own userfolder.
  And perhaps, a possibility to check/search for the available  
  loginnames
  on the LDAP server when adding a user to the userfolder.
 
  I've checked out LDAPUserFolder but that's not what I'm 
 looking for (I
  think...).
 
 I'd say start coding. There is nothing that fits your (somewhat  
 strange) requirements. I would suggest you modify those requirements  
 to come up with a saner plan. Could it be you're thinking too 
 much in  
 terms of specific implementation and too little in terms of what the  
 underlying goals are?
 
 First of all, what do you gain from storing users in Zope? Is your  
 real goal to make sure only a subset of users from LDAP can access  
 your site? That goal is easily fulfilled by configuring the  
 LDAPUserFolder to store role information on the user folder and  
 disregard the LDAP server. Then you just secure your site by  
 requiring a certain role and only give that role to the subset of  
 users you want to let in.
 
 jens

Andreas warned me not to step on your toes ... ;-)
I didn't mean to put LDAPUserFolder down but it felt like using a
canonball to kill a mosquito (famous Dutch saying)
Well I did say I *thought* LDAPUserFolder was not what I was looking
for.
But since you are the expert on LDAPUserFolder I think I should take
that back. What you describe, is what I want to do
.. but I thought it would be necessary to store the users in zope to be
able to form groups in zope...
Perhaps I would have figured it out myself if I was able to get
LDAPUserFolder to work but I think I'm missing something... (well
actually I'm missing a lot... I don't know much about LDAP so start
coding is probably not a good idea...)

Here is my situation at this moment:
I have LDAPUserFolder working in a sense that I can search for users
(and find the ldap entries) when I'm in the LDAPUserFolder - Users tab.
So far so good. But when I limit access to a folder (in the Security tab
on zope) to for example authenticated users and I try to logon to that
folder, after authenticating (using the correct LDAP username and
password) I get an error that doesn't make sense to me. 
Googling does not bring a solution. 
The error is: TypeError  len() of unsized object. (Using wrong (LDAP)
credentials get's me a You are not authorized to access this resource.
Username and password are not correct. message.) On the same folder
this problem does not occur when I use a native zope user to logon.

I'm using on Windows XP 
Zope 2.7.2-0, python 2.3.5, win32
LDAPUserFolder 2.6
OpenLDAP 2.3.11 

And I allso tested on Windows XP with 
Plone 2.1.1 (is with Zope 2.7.8-final, python 2.3.5, win32) 
LDAPUserFolder 2.6 
OpenLDAP 2.3.11

Do you have any idea what I'm doing wrong?

Thanks in advance,

Ria
 
___
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] Zope workflow for change management

2005-12-13 Thread Brant Winter
Hi all - this is my first post to this list, and I am not quite sure if I am in the right spot ! I am looking at building up a change management / release management tool that woudl be hosted online in some form, that has its workflow built around solid ITIL foundations.
I have seen Plone in th epast, and have installed it and played around, but I am wondering if Zope / Plone is the tool for this job ? I am basically drawn to Zope because of its ability to create workflows, but I am not sure if this is exatly the right tool.
Basically I want to be able to create a basic change management workflow, but have different models depending on what type of change is occuring, ie software release as opposed to putting a new server in a live production rack. Each of these 'changes' would require a different workflow model.
Is Zope / Plone for me ?
___
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: _v_func_code

2005-12-13 Thread Florent Guillaume

Rakotomandimby Mihamina wrote:

I'm running zope 2.8.3, python 2.3.5 and CPS SVN trunk.
I update CPS and get this traceback:

Traceback (innermost last):
  *   Module ZPublisher.Publish, line 113, in publish
  *   Module ZPublisher.mapply, line 88, in mapply
  *   Module ZPublisher.Publish, line 40, in call_object
  *   Module Products.ExternalMethod.ExternalMethod, line 229, in
__call__
__traceback_info__: ((CPSDefaultSite at /dedie, None, 0,
'portlets'), {}, (None, 0, 'portlets'))
AttributeError: _v_func_code

So that I could not update my CPS.
I have no more messages.
What could I do? I must update that CPS site...


Add a
  self.getFunction()
before the 'if' at line 229.

Please report if it works, I'll add it in the Zope code.

rantAnother stupid use of _v_ attributes.../rant

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [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 )


Re: [Zope] zope and LDAP for authorisation

2005-12-13 Thread Jens Vagelpohl


On 13 Dec 2005, at 13:11, Marinussen, M.J. (Ria) wrote:

I have LDAPUserFolder working in a sense that I can search for users
(and find the ldap entries) when I'm in the LDAPUserFolder - Users  
tab.
So far so good. But when I limit access to a folder (in the  
Security tab

on zope) to for example authenticated users and I try to logon to that
folder, after authenticating (using the correct LDAP username and
password) I get an error that doesn't make sense to me.
Googling does not bring a solution.
The error is: TypeError  len() of unsized object. (Using wrong  
(LDAP)
credentials get's me a You are not authorized to access this  
resource.

Username and password are not correct. message.) On the same folder
this problem does not occur when I use a native zope user to logon.


I need the full error traceback to help.

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] about mouse interactions..

2005-12-13 Thread Allen Huang
Hi...   This is probably not much about zope, but I want to do make a web page that does mouse drag query that query the zodb for information.For example... I have a picture and I want my mouse to be able to point a single point ordrag a selection box and what ever is selected will make a new web page and with table about its information.Would anyone give me some pointers about how I could accomplish this? what docs or books I should read?
	
		Yahoo! Shopping 
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
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] about mouse interactions..

2005-12-13 Thread Jonathan



You seem to be mixing together client-side activity 
('mouse selection') and server-side activity ('query the zodb'?). You will need to separate these two activities: use 
_javascript_ for the client side and build a normal form-based request which is 
then submitted to a zope method (dtml/script/external method) which processes 
the fields from the form request and returns some object(s)? from the 
zodb.

hth

Jonathan

  - Original Message - 
  From: 
  Allen Huang 

  To: Zope 
  Sent: Tuesday, December 13, 2005 9:32 
  AM
  Subject: [Zope] about mouse 
  interactions..
  
  Hi... 
  This is probably not much about zope, but I want to do make a web page 
  that does mouse drag query that query the zodb for information.
  
  For example... I have a picture and I want my mouse to be able to point a 
  single point ordrag a selection box and what ever is selected will make 
  a new web page and with table about its information.
  
  Would anyone give me some pointers about how I could accomplish this? 
  what docs or books I should read?
  
  
  Yahoo! ShoppingFind Great Deals on Holiday Gifts at Yahoo! 
  Shopping 
  
  

  ___Zope maillist 
  - 
  Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** 
  No cross posts or HTML encoding! **(Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announcehttp://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 )


[Zope] Re: _v_func_code

2005-12-13 Thread Rakotomandimby Mihamina

 Add a
self.getFunction()
 before the 'if' at line 229.
 Please report if it works, I'll add it in the Zope code.

Well. The update worked, but the cpsupdate ext method did not display
the usual report saying what have been done.
Then when I restart Zope just to see what happens, the site was broken.
I had this on the web page:
http://www.cps-project.org/workspaces/members/mihamina/traceback/

I had his on the command line:
#
root-H9-20./bin/runzope
WARNING: rdflib is not installed (or no compatible version): no RDF
feature will be available
WARNING: Redland is not installed, no RDF feature will be available
/home/mihamina/websites/7/Products/FCKeditor/__init__.py:7:
DeprecationWarning: The module, 'Prod ucts.CMFCore.CMFCorePermissions'
is a deprecated compatiblity alias for 'Products.CMFCore.permiss ions';
please use the new module instead.
  from Products.CMFCore.CMFCorePermissions import View
/home/mihamina/websites/7/Products/CMFQuickInstallerTool/__init__.py:34:
DeprecationWarning: The product_name parameter of ToolInit is deprecated
and will be ignored in CMF 2.0: QuickInstallerTo ol
  icon='tool.gif'
/home/mihamina/websites/7/Products/CMFonFive/__init__.py:21:
DeprecationWarning: The product_name  parameter of ToolInit is
deprecated and will be ignored in CMF 2.0: CMFonFive
  , icon='tool.gif'
/usr/local/zope/lib/python/zope/configuration/fields.py:382:
UserWarning: You did not specify an i18n translation domain for the
'title' field
in /home/mihamina/websites/7/Products/CPSMailAccess /permissions.zcml
  warnings.warn(
/usr/local/zope/lib/python/zope/configuration/fields.py:382:
UserWarning: You did not specify an i18n translation domain for the
'title' field in /home/mihamina/websites/7/Products/CPSSharedCale
ndar/../CalZope/permissions.zcml
  warnings.warn(
/usr/local/zope/lib/python/zope/configuration/fields.py:382:
UserWarning: You did not specify an i18n translation domain for the
'title' field in /home/mihamina/websites/7/Products/CPSSharedCale
ndar/configure.zcml
  warnings.warn(
/usr/local/zope/lib/python/zope/configuration/fields.py:382:
UserWarning: You did not specify an i18n translation domain for the
'label' field in /home/mihamina/websites/7/Products/CalZope/brows
er/configure.zcml
  warnings.warn(
/usr/local/zope/lib/python/zope/configuration/fields.py:382:
UserWarning: You did not specify an i18n translation domain for the
'label' field in /home/mihamina/websites/7/Products/CPSSharedCale
ndar/overrides.zcml
  warnings.warn(
/home/mihamina/websites/7/Products/CMFCore/DirectoryView.py:423:
UserWarning: DirectoryView cps_d efault_installer refers to a
non-existing path CPSDefault/skins/cps_default_installer
  % (self.id, dirpath), UserWarning)
/home/mihamina/websites/7/Products/CMFCore/DirectoryView.py:423:
UserWarning: DirectoryView epoz refers to a non-existing path
Epoz/skins/epoz
  % (self.id, dirpath), UserWarning)
/home/mihamina/websites/7/Products/CMFCore/DirectoryView.py:423:
UserWarning: DirectoryView cps_r ss refers to a non-existing path
CPSRSS/skins
  % (self.id, dirpath), UserWarning)
/home/mihamina/websites/7/Products/CMFCore/DirectoryView.py:423:
UserWarning: DirectoryView cpsca lendar_images refers to a non-existing
path CPSCalendar/skins/cps_calendar_images
  % (self.id, dirpath), UserWarning)
/home/mihamina/websites/7/Products/CMFCore/DirectoryView.py:423:
UserWarning: DirectoryView cpsca lendar_skins refers to a non-existing
path CPSCalendar/skins/cps_calendar
  % (self.id, dirpath), UserWarning)
/home/mihamina/websites/7/Products/CMFCore/DirectoryView.py:423:
UserWarning: DirectoryView cpspo rtlets_widgets_cps3 refers to a
non-existing path CPSPortlets/skins/cpsportlets_widgets_cps3
  % (self.id, dirpath), UserWarning)
### 

I switch to CPS-devel ML.
-- 
A powerfull GroupWare, CMS, CRM, ECM: CPS (Open Source  GPL).
Opengroupware, SPIP, Plone, PhpBB, JetSpeed... are good: CPS is better.
http://www.cps-project.org for downloads  documentation.
Free hosting of CPS groupware: http://www.objectis.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 )


[Zope] Recursive Display Of All Folder Items

2005-12-13 Thread Francisco Chamorro
Hi everyone, I am trying to get a dump of all the content currently in our 
zope server.  Using DTML I was able to get the top level folders to display 
their content but I am unable to recursively display the contents of the 
sub-folders.


This is the code I am using for my top level folders, where TV is the name 
of the folder I want to display.


dtml-in TV.objectValues()dtml-var idbr/dtml-in


My second attempt at displaying sub-folder content was the following:

dtml-in TV.objectItems()
id: dtml-var id,br
type: dtml-var meta_typebr
dtml-if meta_type=='Folder'
dtml-in expr=objectValues(dtml-var id)
id: dtml-var id,br
type: dtml-var meta_typebr
/dtml-in
/dtml-if
/dtml-in

But that also fails.  I searched the documentation and found a post about 
recursively calling the same function but that did not work as I get a 
excessive recursion error. Any help on this problem would be greatly 
appreciated.


Thank you.

-Francisco


___
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] Recursive Display Of All Folder Items

2005-12-13 Thread J Cameron Cooper

Francisco Chamorro wrote:
Hi everyone, I am trying to get a dump of all the content currently in 
our zope server.  Using DTML I was able to get the top level folders to 
display their content but I am unable to recursively display the 
contents of the sub-folders.


This is the code I am using for my top level folders, where TV is the 
name of the folder I want to display.


dtml-in TV.objectValues()dtml-var idbr/dtml-in


My second attempt at displaying sub-folder content was the following:

dtml-in TV.objectItems()
id: dtml-var id,br
type: dtml-var meta_typebr
dtml-if meta_type=='Folder'
dtml-in expr=objectValues(dtml-var id)
id: dtml-var id,br
type: dtml-var meta_typebr
/dtml-in
/dtml-if
/dtml-in

But that also fails.  I searched the documentation and found a post 
about recursively calling the same function but that did not work as I 
get a excessive recursion error. Any help on this problem would be 
greatly appreciated.


objectValues is acquired on all objects, even non-folderish ones. Thus 
recursion never stops. You must ask for it explicitly: 
aq_inner.aq_explicit or something like that if I remember directly.


--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] Re: Issues with pyperl: perl2.so not found

2005-12-13 Thread Derrick Hudson
On Fri, Nov 04, 2005 at 07:54:25AM +1300, Cameron Beattie wrote:
| 
| On 11/3/05, Cameron Beattie [EMAIL PROTECTED] wrote:
| pyperl is a prerequisite to zoperl which allows perl scripts to be used
| within zope. I should have mentioned that.
| 
| Try the zope-perl@zope.org, if it still exists...
| 
| Thanks. Will do.
| 
| zoperl hasn't been updated since 2001. That's probably more due to
| nobody using it than being perfect. The reason for that is that Zope
| already has a very good scripting language, so the need to use perl is
| very miniscule, and almost always more pain than it's worth.
| 
| I'm very happy with Zope and python. Unfortunately my bank doesn't have a 
| python version of it's API which is why I'm trying to use perl with Zope.

For that you might try some alternate approaches:

- create a command-line wrapper for the API;  in zope you can then
  use python's subprocess module to run the perl program that will
  make the API calls  (I am successfully using this for a certain
  Java API)

- create a non-zope server to host the perl portion and use
  XML-RPC or SOAP or whatever to communicate to that from your
  zope app

- port the perl code to python (after all you have the source)

HTH,
-D

-- 
He is no fool who gives up what he cannot keep to gain what he cannot lose.
--Jim Elliot
 
www: http://dman13.dyndns.org/~dman/jabber: [EMAIL PROTECTED]


signature.asc
Description: Digital 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] Recursive Display Of All Folder Items

2005-12-13 Thread Paul Winkler
On Tue, Dec 13, 2005 at 01:44:00PM -0600, J Cameron Cooper wrote:
 Francisco Chamorro wrote:
 Hi everyone, I am trying to get a dump of all the content currently in 
 our zope server.  Using DTML I was able to get the top level folders to 
 display their content but I am unable to recursively display the 
 contents of the sub-folders.
 
 This is the code I am using for my top level folders, where TV is the 
 name of the folder I want to display.
 
 dtml-in TV.objectValues()dtml-var idbr/dtml-in
 
 
 My second attempt at displaying sub-folder content was the following:
 
 dtml-in TV.objectItems()
 id: dtml-var id,br
 type: dtml-var meta_typebr
 dtml-if meta_type=='Folder'
 dtml-in expr=objectValues(dtml-var id)
 id: dtml-var id,br
 type: dtml-var meta_typebr
 /dtml-in
 /dtml-if
 /dtml-in
 
 But that also fails.  I searched the documentation and found a post 
 about recursively calling the same function but that did not work as I 
 get a excessive recursion error. Any help on this problem would be 
 greatly appreciated.
 
 objectValues is acquired on all objects, even non-folderish ones. Thus 
 recursion never stops. You must ask for it explicitly: 
 aq_inner.aq_explicit or something like that if I remember directly.

You shouldn't have to, if you're dealing with objects that inherit from
OFS.SimpleItem.Item.  This code is *supposed* to prevent infinite
recursion:

# This keeps simple items from acquiring their parents
# objectValues, etc., when used in simple tree tags.
def objectValues(self, spec=None):
return ()
objectIds=objectItems=objectValues

But of course, there's no requirement for everything to inherit from
Item. All it takes is one persistent object that doesn't and you can get
an infinite recursion.

Another option, if you don't have a catalog handy, is to use
ZopeFind().  See lib/python/OFS/FindSupport.py.
(The docstring is unhelpful, but the method signature 
should give you a clue what to pass to it; or, look at the
source for the Find page in the ZMI.)
Call ZopeFind() on the folder you want to start your search at.

-- 

Paul Winkler
http://www.slinkp.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] Zope and Image display

2005-12-13 Thread tyson

Hi-
 I have a dtml form that loads a binary image from a python script.  
This works fine with no problems, but I want to return the image and 
also some other data as well.  The only thing is when I return the 
information in the form of a list, my image won't load.  I think that 
the list automatically changes the binary image into a string or 
something. Does anybody know about this or some work around by any chance?


Here is my python script py_get_image():

*#calling an external method to get binary image
ganttImageData = context.loadGanttWSping()

#returing a list starting with the image, and then a string
return (ganttImageData[0], ganttImageData[1])*

Here is the dtml code that works if I don't return it as a list:

*dtml-var standard_html_header

img src=py_get_image

dtml-var standard_html_footer
*
Here is the dtml code that doesn't work:

*dtml-var standard_html_header

dtml-in py_get_image
 dtml-if sequence-start
   img src=_['sequence-item']
 dtml-else
  dtml-var sequence-item
 /dtml-if
/dtml-in

dtml-var standard_html_footer*

Also, this doesn't work either:

*dtml-var standard_html_header

dtml-var py_get_image[0]

dtml-var standard_html_footer
*
Any help would be much appreciated!



___
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] Zope workflow for change management

2005-12-13 Thread Jonathan Cyr




Could be... Plone is a product
built on top of Zope, and includes a component called CMF (content
management framework) CMF is available as a Zope extension without
Plone, as well. CMF is the workflow piece of the puzzle. The piece
you seek.

I'd research CMF to see if you need the overhead of Plone or not.
There are Plone and CMF mailing lists which could give you a more
detailed resource.

-Jon Cyr

Brant Winter wrote:
Hi all - this is my first post to this list, and I am not
quite sure if I am in the right spot ! I am looking at building up a
change management / release management tool that woudl be hosted online
in some form, that has its workflow built around solid ITIL
foundations.
  
  
I have seen Plone in th epast, and have installed it and played around,
but I am wondering if Zope / Plone is the tool for this job ? I am
basically drawn to Zope because of its ability to create workflows, but
I am not sure if this is exatly the right tool.
  
  
Basically I want to be able to create a basic change management
workflow, but have different models depending on what type of change is
occuring, ie software release as opposed to putting a new server in a
live production rack. Each of these 'changes' would require a different
workflow model.
  
  
Is Zope / Plone for me ?
  

___
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 )
  


-- 
Jonathan Cyr
http://www.cyr.info
http://www.weddingweblog.com
[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 )


Re: [Zope] Re: just curious: zope and ingres

2005-12-13 Thread Jonathan Cyr




A blessing, CA is a bottom-feeder,
and I'm glad they're not associated with Zope. 

-Jon

Vlada Macek wrote:

  [At 13.12.2005 01:17, Alexander Limi kindly sent the following quotation.]

  
  
On Mon, 12 Dec 2005 08:33:25 -0800, Sascha Ottolski
[EMAIL PROTECTED] wrote:



  I remembered reading about the plans to create RDBMS integration as
alternative to ZODB about 1,5 years ago:

http://www.zope.com/about_us/press_releases/ca_and_zope.html

Doesn't seem to be alive anymore, right?
  

CA seems to have dropped both Ingres and their involvement with Zope,
so I believe that would be right, yes.

  
  
What a surprise when the people involved are not willing to proof-read
at least the title of the annoucements they make. };-]


  


-- 
Jonathan Cyr
http://www.cyr.info
http://www.weddingweblog.com
[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] user account defined outside context of object being accessed

2005-12-13 Thread Kees de Brabander
I am in the process of upgrading from zope 2.5.1 (yes very old)
I used to use the following set up. Prototypically I had the following chain
of folders and methods:
f1 (folder)
f1_index (dtmlmethod)
f11 (folder)
acl_users (user folder)
f111 folder
index_html (calling f1_index)
I used f1 to place methods and scripts to be acquired by methods in f111. At
the level of f1 I defined local roles, disabled the acquisition of the view
permission and added that permission on the same level again to existing
roles including the local roles except Anonymous. F11 contained a user
folder populated with accounts with with local roles defined in f1.
The url www.domain.nl/f1/f11/f111 would render the content of f1_index after
logging in with an account from acl_users in f11 (basic authentication),
that is at least up to zope 2.7.3. At least from 2.7.8. on this very same
user is not allowed to access f1_index anymore.
I could solve the problem by moving the user folder from f11 to f1, but
actually I have also f12, f13, f14, and so on, each with its distinct group
of users. The setup described enabled me to remove folders at the second
level when they are not needed any more including the whole group of users
involved. Furthermore, though the second level folders share a group of
methods, some were also specific for specific groups.
Another option would be to disable the acquisition of the view permission
not on the f1 level, but on the f11 level. However, in that case the url
www.domain.nl/f1 would acquire the index_html from the root folder in stead
of disallowing access.
Apparently I have to change my habits. But how do I come near to my use
case?

The error message is most verbose in 2.8.4 and reads:
Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - DTMLMethod at /f1/f11/f111/index_html
   - URL: http://localhost:8080/f1/f11/f111/index_html/manage_main
   - Physical Path: /f1/f11/f111/index_html
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module AccessControl.ImplPython, line 184, in guarded_getattr
  Module AccessControl.ImplPython, line 693, in guarded_getattr
  Module AccessControl.ImplPython, line 635, in aq_validate
  Module AccessControl.ImplPython, line 529, in validate
  Module AccessControl.ImplPython, line 449, in validate
  Module AccessControl.ImplPython, line 774, in raiseVerbose
Unauthorized: Your user account is defined outside the context of the object
being accessed.  Access to 'f1_index' of (Folder at /f1), acquired through
(Folder at /f1/f11/f111), denied. Your user account, user1, exists at
/f1/f11/acl_users. Access requires one of the following roles:
['Authenticated', 'Manager', 'Owner', 'student'].


f1.zexp
Description: Binary data
___
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] Zope and Image display

2005-12-13 Thread J Cameron Cooper

tyson wrote:

Hi-
 I have a dtml form that loads a binary image from a python script.  
This works fine with no problems, but I want to return the image and 
also some other data as well.  The only thing is when I return the 
information in the form of a list, my image won't load.  I think that 
the list automatically changes the binary image into a string or 
something. Does anybody know about this or some work around by any chance?


The data that defines an images cannot be placed in HTML. The webbish 
way of doing things is to link to an external resource, which is what 
the 'src' in an 'img' tag is all about.


You may return an image from a Python script, but since you have to tell 
your web browser Hey, that there resource is an image, go fetch it it 
cannot work to return anything but the binary data.


--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] zope and LDAP for authorisation

2005-12-13 Thread J Cameron Cooper

Marinussen, M.J. (Ria) wrote:


Hi,

I'm looking for a zope product that enables me to use our Active
Directory LDAP server for verification of login credentials only.
I want users still stored in Zope, and access to directories should be
also something I can handle in Zope, and I don't want to use LDAP groups
because I don't control the LDAP server and there are no groups on the
LDAP server I can use.

So really, all I want is that Zope checks the passwords with the LDAP
server instead of with it's own userfolder.
And perhaps, a possibility to check/search for the available loginnames
on the LDAP server when adding a user to the userfolder.

I've checked out LDAPUserFolder but that's not what I'm looking for (I
think...).

Does anyone know whether there is such a product, or give me some
poiners to adapt an exisiting product to my needs?


There is an LDAPMultiplugin for PluggableAuthService, which might make 
this easier. It could be as easy as installing LDAPUF in PAS and turning 
off all its interfaces except for the auth one.


However, I don't quite see how you would store users in Zope and then 
ask for the password in LDAP on a one-to-one basis. Seems like you're 
relying on an accidental correspondence between ZODB-stored user names 
and LDAP user names.


   --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] Zope workflow for change management

2005-12-13 Thread Paul Winkler
On Tue, Dec 13, 2005 at 04:34:50PM -0500, Jonathan Cyr wrote:
 Could be... Plone is a product built on top of Zope, and includes a 
 component called CMF (content management framework)  CMF is available as 
 a Zope extension without Plone, as well.  CMF is the workflow piece of 
 the puzzle.  The piece you seek.

Well, I'd say rather that CMF *includes* a workflow piece of the
puzzle.  CMF stands for Content Management Framework; lots of
it has nothing to do with workflow at all. The workflow package
that comes with it is DCWorkflow, although you can ignore that and use
other implementations such as Openflow.

-- 

Paul Winkler
http://www.slinkp.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] zope and LDAP for authorisation

2005-12-13 Thread Andrew Milton
+---[ J Cameron Cooper ]--
| Marinussen, M.J. (Ria) wrote:
| 
| Hi,
| 
| I'm looking for a zope product that enables me to use our Active
| Directory LDAP server for verification of login credentials only.
| I want users still stored in Zope, and access to directories should be
| also something I can handle in Zope, and I don't want to use LDAP groups
| because I don't control the LDAP server and there are no groups on the
| LDAP server I can use.
| 
| So really, all I want is that Zope checks the passwords with the LDAP
| server instead of with it's own userfolder.
| And perhaps, a possibility to check/search for the available loginnames
| on the LDAP server when adding a user to the userfolder.

You can do this exUserFolder without too much drama.

The Require User item for the LDAP Auth Source allows you to specify an
attribute and a list of values. You can use uid (e.g.) and supply a list of
user ids.

-- 
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] List within a list - how to use in a page template

2005-12-13 Thread Cameron Beattie

I am trying to get my head around representing a list in a page template.

Assume the following list:

m
[[61282125371L, 1, 6, 0], [61282125379L, 1, 6, 0], [61282825240L, 6, 6, 0], 
[61282125378L, 1, 6, 0], [61282125374L, 1, 6, 0]

m[0]

[61282125371L, 1, 6, 0]

m[0][0]

61282125371L

i.e. m is a list where each member is itself a list.

How do I get a page template to render a particular item? Assume a function 
getem returns the list.

tal:block repeat=m python:here.getem()
   td tal:repeat=single m tal:content=single/td

This code will produce four columns and five rows, with each populated by 
the list members. But what if I only want the first and third members in 
each case i.e. 2 columns and five rows?


I thought it would be something like tal:content=python:single[0] but that 
gives me an unsubscriptable object error.


Any suggestions would be appreciated.

Cameron 


___
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] List within a list - how to use in a page template

2005-12-13 Thread Paul Winkler
On Wed, Dec 14, 2005 at 06:06:21PM +1300, Cameron Beattie wrote:
 I am trying to get my head around representing a list in a page template.
 
 Assume the following list:
 m
 [[61282125371L, 1, 6, 0], [61282125379L, 1, 6, 0], [61282825240L, 6, 6, 0], 
 [61282125378L, 1, 6, 0], [61282125374L, 1, 6, 0]
 m[0]
 [61282125371L, 1, 6, 0]
 m[0][0]
 61282125371L
 
 i.e. m is a list where each member is itself a list.
 
 How do I get a page template to render a particular item? Assume a function 
 getem returns the list.
 tal:block repeat=m python:here.getem()
td tal:repeat=single m tal:content=single/td
 
 This code will produce four columns and five rows, with each populated by 
 the list members. But what if I only want the first and third members in 
 each case i.e. 2 columns and five rows?
 
 I thought it would be something like tal:content=python:single[0] but 
 that gives me an unsubscriptable object error.

That's because, in your example, each time through the loop,
single is an int. Try indexing m instead.

-- 

Paul Winkler
http://www.slinkp.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] List within a list - how to use in a page template

2005-12-13 Thread David H




Paul Winkler wrote:

  On Wed, Dec 14, 2005 at 06:06:21PM +1300, Cameron Beattie wrote:
  
  
I am trying to get my head around representing a list in a page template.

Assume the following list:


  

  m
  

  

[[61282125371L, 1, 6, 0], [61282125379L, 1, 6, 0], [61282825240L, 6, 6, 0], 
[61282125378L, 1, 6, 0], [61282125374L, 1, 6, 0]


  

  m[0]
  

  

[61282125371L, 1, 6, 0]


  

  m[0][0]
  

  

61282125371L

i.e. m is a list where each member is itself a list.

How do I get a page template to render a particular item? Assume a function 
getem returns the list.
tal:block repeat="m python:here.getem()"
   td tal:repeat="single m" tal:content="single"/td

This code will produce four columns and five rows, with each populated by 
the list members. But what if I only want the first and third members in 
each case i.e. 2 columns and five rows?

I thought it would be something like tal:content="python:single[0]" but 
that gives me an unsubscriptable object error.

  
  
That's because, in your example, each time through the loop,
single is an int. Try indexing m instead.

  

I think all thats needed is a tal:condition (he wants to filter out
rows)

1)span tal:define="res python: context.pyTest();" --- returns
list of lists like [[61282125371L, 1, 6, 0], [61282125379L, 1, 6, 0],
[61282825240L, 6, 6, 0]]tal:repeat="r1 res"
3)  tal:span tal:repeat = "r2 r1" 
4)  tal:condition="python: repeat.r2.number in (1,2,4)" 
5)  tal:content="r2"
6) /tal:span

Where 4 is not brain dead as in my example. 

David






___
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 )