Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-09 Thread Richard Harley
I think earlier than Zope 2.12 python 2.4 is mandatory.. don't quote me 
on that :)

On 09/12/10 06:52, Dan Gaibel wrote:
 So OS X Server Snow Leopard comes with Python 2.6.1. Is there any
 reason to think that this Python version would cause problems with
 Zope 2.8.6? We have had nice stability with Python 2.3.5. Either way,
 is Zope 2.8.7 a significantly better choice than 2.8.6?


 On Dec 8, 2010, at 8:22 AM, Richard Harley wrote:


 Dan - we are using 64bit Zope 2.8.7 and python 2.4 with no problems
 for
 years now. It can do everything we want with regards to Python
 scripting, database connectivity etc.

 I can't think of any huge problems with staying on Zope 2.8.6/7 era. I
 have said before 2.10+ breaks lots of products that would take ages to
 hack about (especially for companies using Zope not individuals with
 time on their hands). I'm all for upgrading, bug fixing and
 refactoring
 normally, but the backwards compatibility with Zope makes it harder
 than
 it should be.

 Rich


 On 08/12/10 12:11, Peter Bengtsson wrote:
  
 We're running several perfectly working 2.8 Zopes. They've been
 very stable.
 Annoying that Ubuntu insists on making Python 2.4 hard to install but
 for some of the servers we've changed back to Debian.

 On 7 December 2010 16:58, Dan Gaibeld...@cornell.edu   wrote:


 Good advice here, thanks! Is it a big mistake to stay at Zope
 2.8.6? The server has been very stable for years, apparently. What
 are the downfalls of not upgrading all the way past 2.10?

 On Dec 7, 2010, at 2:40 PM, Andrew Milton wrote:


  
 +---[ Tres Seaver ]--
 | -BEGIN PGP SIGNED MESSAGE-
 | Hash: SHA1
 |
 | On 12/07/2010 01:18 PM, Dan Gaibel wrote:
 |
 |   I have recently inherited the responsibility of supporting a
 fairly
 |   complex web server running Zope 2.8.6 on Python 2.3.5. This
 |   configuration is currently on a Linux (Fedora Core) server
 and I
 |   would like very much to migrate to OS X Server Snow Leopard.
 It also
 |   seems to me that I should consider upgrading Zope to a more
 current
 |   release while I'm at it. We heavily use MySQL and associated
 |   products, LocalFS, and the Python Imagining Library. We have a
 |   variety of ZClass homegrown products as well.
 |
 |   I know that I'm in for a headache no matter what, but I
 wonder if any
 |   of you folks could point me in the right direction or offer
 advice on
 |   the situation. Is it crazy to jump from 2.8.6 to 2.12? Does
 anyone
 |   use OS X Server for Zope? Is this migration a mistake? Any
 pitfalls I
 |   should be looking out for?
 |
 | I would do this in small steps, e.g. first migrate to the new
 machine / OS:
 |
 | - - Get Python 2.3.x installed on the OS/X server.
 |
 | - - Build the latest Zope 2.8.* on that server.
 |
 | - - Install and test products there in the same versions  you
 now use.
 |
 | - - Copy your old database over and test.
 |
 | then upgrade the software stack:
 |
 | - - Move carefully through the Zope releases (I would to 2.9,
 2.10, and'
 |   2.12), upgrading Python as needed  to stay on a supported
 version.
 |
 | - - Check for upgrades to the products, and their compatibility
 with
 |   Zope versions.  Test them, and your site. after each upgrade.

 The move from 2.9 to 2.10 is likely to be the most painful part in
 terms of legacy Zope apps. A lot of products will break on 2.10

 --
 Andrew Milton
 a...@theinternet.com.au
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


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


  



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


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


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-09 Thread Lennart Regebro
On Thu, Dec 9, 2010 at 07:52, Dan Gaibel d...@cornell.edu wrote:
 So OS X Server Snow Leopard comes with Python 2.6.1. Is there any
 reason to think that this Python version would cause problems with
 Zope 2.8.6?

Yes, that would cause problems.

 We have had nice stability with Python 2.3.5. Either way,
 is Zope 2.8.7 a significantly better choice than 2.8.6?

No, but then it's unlikely to cause you any upgrade worries as it
should be pretty much only bugfixes.

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


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-08 Thread Peter Bengtsson
We're running several perfectly working 2.8 Zopes. They've been very stable.
Annoying that Ubuntu insists on making Python 2.4 hard to install but
for some of the servers we've changed back to Debian.

On 7 December 2010 16:58, Dan Gaibel d...@cornell.edu wrote:
 Good advice here, thanks! Is it a big mistake to stay at Zope 2.8.6? The 
 server has been very stable for years, apparently. What are the downfalls of 
 not upgrading all the way past 2.10?

 On Dec 7, 2010, at 2:40 PM, Andrew Milton wrote:

 +---[ Tres Seaver ]--
 | -BEGIN PGP SIGNED MESSAGE-
 | Hash: SHA1
 |
 | On 12/07/2010 01:18 PM, Dan Gaibel wrote:
 |
 |  I have recently inherited the responsibility of supporting a fairly
 |  complex web server running Zope 2.8.6 on Python 2.3.5. This
 |  configuration is currently on a Linux (Fedora Core) server and I
 |  would like very much to migrate to OS X Server Snow Leopard. It also
 |  seems to me that I should consider upgrading Zope to a more current
 |  release while I'm at it. We heavily use MySQL and associated
 |  products, LocalFS, and the Python Imagining Library. We have a
 |  variety of ZClass homegrown products as well.
 | 
 |  I know that I'm in for a headache no matter what, but I wonder if any
 |  of you folks could point me in the right direction or offer advice on
 |  the situation. Is it crazy to jump from 2.8.6 to 2.12? Does anyone
 |  use OS X Server for Zope? Is this migration a mistake? Any pitfalls I
 |  should be looking out for?
 |
 | I would do this in small steps, e.g. first migrate to the new machine / OS:
 |
 | - - Get Python 2.3.x installed on the OS/X server.
 |
 | - - Build the latest Zope 2.8.* on that server.
 |
 | - - Install and test products there in the same versions  you now use.
 |
 | - - Copy your old database over and test.
 |
 | then upgrade the software stack:
 |
 | - - Move carefully through the Zope releases (I would to 2.9, 2.10, and'
 |   2.12), upgrading Python as needed  to stay on a supported version.
 |
 | - - Check for upgrades to the products, and their compatibility with
 |   Zope versions.  Test them, and your site. after each upgrade.

 The move from 2.9 to 2.10 is likely to be the most painful part in
 terms of legacy Zope apps. A lot of products will break on 2.10

 --
 Andrew Milton
 a...@theinternet.com.au
 ___
 Zope maillist  -  z...@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

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




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


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-08 Thread Richard Harley
Dan - we are using 64bit Zope 2.8.7 and python 2.4 with no problems for 
years now. It can do everything we want with regards to Python 
scripting, database connectivity etc.

I can't think of any huge problems with staying on Zope 2.8.6/7 era. I 
have said before 2.10+ breaks lots of products that would take ages to 
hack about (especially for companies using Zope not individuals with 
time on their hands). I'm all for upgrading, bug fixing and refactoring 
normally, but the backwards compatibility with Zope makes it harder than 
it should be.

Rich


On 08/12/10 12:11, Peter Bengtsson wrote:
 We're running several perfectly working 2.8 Zopes. They've been very stable.
 Annoying that Ubuntu insists on making Python 2.4 hard to install but
 for some of the servers we've changed back to Debian.

 On 7 December 2010 16:58, Dan Gaibeld...@cornell.edu  wrote:

 Good advice here, thanks! Is it a big mistake to stay at Zope 2.8.6? The 
 server has been very stable for years, apparently. What are the downfalls of 
 not upgrading all the way past 2.10?

 On Dec 7, 2010, at 2:40 PM, Andrew Milton wrote:

  
 +---[ Tres Seaver ]--
 | -BEGIN PGP SIGNED MESSAGE-
 | Hash: SHA1
 |
 | On 12/07/2010 01:18 PM, Dan Gaibel wrote:
 |
 |  I have recently inherited the responsibility of supporting a fairly
 |  complex web server running Zope 2.8.6 on Python 2.3.5. This
 |  configuration is currently on a Linux (Fedora Core) server and I
 |  would like very much to migrate to OS X Server Snow Leopard. It also
 |  seems to me that I should consider upgrading Zope to a more current
 |  release while I'm at it. We heavily use MySQL and associated
 |  products, LocalFS, and the Python Imagining Library. We have a
 |  variety of ZClass homegrown products as well.
 |
 |  I know that I'm in for a headache no matter what, but I wonder if any
 |  of you folks could point me in the right direction or offer advice on
 |  the situation. Is it crazy to jump from 2.8.6 to 2.12? Does anyone
 |  use OS X Server for Zope? Is this migration a mistake? Any pitfalls I
 |  should be looking out for?
 |
 | I would do this in small steps, e.g. first migrate to the new machine / 
 OS:
 |
 | - - Get Python 2.3.x installed on the OS/X server.
 |
 | - - Build the latest Zope 2.8.* on that server.
 |
 | - - Install and test products there in the same versions  you now use.
 |
 | - - Copy your old database over and test.
 |
 | then upgrade the software stack:
 |
 | - - Move carefully through the Zope releases (I would to 2.9, 2.10, and'
 |   2.12), upgrading Python as needed  to stay on a supported version.
 |
 | - - Check for upgrades to the products, and their compatibility with
 |   Zope versions.  Test them, and your site. after each upgrade.

 The move from 2.9 to 2.10 is likely to be the most painful part in
 terms of legacy Zope apps. A lot of products will break on 2.10

 --
 Andrew Milton
 a...@theinternet.com.au
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

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

  




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


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-08 Thread Dan Gaibel
So OS X Server Snow Leopard comes with Python 2.6.1. Is there any  
reason to think that this Python version would cause problems with  
Zope 2.8.6? We have had nice stability with Python 2.3.5. Either way,  
is Zope 2.8.7 a significantly better choice than 2.8.6?


On Dec 8, 2010, at 8:22 AM, Richard Harley wrote:

 Dan - we are using 64bit Zope 2.8.7 and python 2.4 with no problems  
 for
 years now. It can do everything we want with regards to Python
 scripting, database connectivity etc.

 I can't think of any huge problems with staying on Zope 2.8.6/7 era. I
 have said before 2.10+ breaks lots of products that would take ages to
 hack about (especially for companies using Zope not individuals with
 time on their hands). I'm all for upgrading, bug fixing and  
 refactoring
 normally, but the backwards compatibility with Zope makes it harder  
 than
 it should be.

 Rich


 On 08/12/10 12:11, Peter Bengtsson wrote:
 We're running several perfectly working 2.8 Zopes. They've been  
 very stable.
 Annoying that Ubuntu insists on making Python 2.4 hard to install but
 for some of the servers we've changed back to Debian.

 On 7 December 2010 16:58, Dan Gaibeld...@cornell.edu  wrote:

 Good advice here, thanks! Is it a big mistake to stay at Zope  
 2.8.6? The server has been very stable for years, apparently. What  
 are the downfalls of not upgrading all the way past 2.10?

 On Dec 7, 2010, at 2:40 PM, Andrew Milton wrote:


 +---[ Tres Seaver ]--
 | -BEGIN PGP SIGNED MESSAGE-
 | Hash: SHA1
 |
 | On 12/07/2010 01:18 PM, Dan Gaibel wrote:
 |
 |  I have recently inherited the responsibility of supporting a  
 fairly
 |  complex web server running Zope 2.8.6 on Python 2.3.5. This
 |  configuration is currently on a Linux (Fedora Core) server  
 and I
 |  would like very much to migrate to OS X Server Snow Leopard.  
 It also
 |  seems to me that I should consider upgrading Zope to a more  
 current
 |  release while I'm at it. We heavily use MySQL and associated
 |  products, LocalFS, and the Python Imagining Library. We have a
 |  variety of ZClass homegrown products as well.
 |
 |  I know that I'm in for a headache no matter what, but I  
 wonder if any
 |  of you folks could point me in the right direction or offer  
 advice on
 |  the situation. Is it crazy to jump from 2.8.6 to 2.12? Does  
 anyone
 |  use OS X Server for Zope? Is this migration a mistake? Any  
 pitfalls I
 |  should be looking out for?
 |
 | I would do this in small steps, e.g. first migrate to the new  
 machine / OS:
 |
 | - - Get Python 2.3.x installed on the OS/X server.
 |
 | - - Build the latest Zope 2.8.* on that server.
 |
 | - - Install and test products there in the same versions  you  
 now use.
 |
 | - - Copy your old database over and test.
 |
 | then upgrade the software stack:
 |
 | - - Move carefully through the Zope releases (I would to 2.9,  
 2.10, and'
 |   2.12), upgrading Python as needed  to stay on a supported  
 version.
 |
 | - - Check for upgrades to the products, and their compatibility  
 with
 |   Zope versions.  Test them, and your site. after each upgrade.

 The move from 2.9 to 2.10 is likely to be the most painful part in
 terms of legacy Zope apps. A lot of products will break on 2.10

 --
 Andrew Milton
 a...@theinternet.com.au
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

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






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

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


[Zope] Question about Upgrading Zope and OS X Server

2010-12-07 Thread Dan Gaibel
Greetings,

I have recently inherited the responsibility of supporting a fairly complex web 
server running Zope 2.8.6 on Python 2.3.5. This configuration is currently on a 
Linux (Fedora Core) server and I would like very much to migrate to OS X Server 
Snow Leopard. It also seems to me that I should consider upgrading Zope to a 
more current release while I'm at it. We heavily use MySQL and associated 
products, LocalFS, and the Python Imagining Library. We have a variety of 
ZClass homegrown products as well.

I know that I'm in for a headache no matter what, but I wonder if any of you 
folks could point me in the right direction or offer advice on the situation. 
Is it crazy to jump from 2.8.6 to 2.12? Does anyone use OS X Server for Zope? 
Is this migration a mistake? Any pitfalls I should be looking out for?

Many thanks,

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


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-07 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/07/2010 01:18 PM, Dan Gaibel wrote:

 I have recently inherited the responsibility of supporting a fairly
 complex web server running Zope 2.8.6 on Python 2.3.5. This
 configuration is currently on a Linux (Fedora Core) server and I
 would like very much to migrate to OS X Server Snow Leopard. It also
 seems to me that I should consider upgrading Zope to a more current
 release while I'm at it. We heavily use MySQL and associated
 products, LocalFS, and the Python Imagining Library. We have a
 variety of ZClass homegrown products as well.
 
 I know that I'm in for a headache no matter what, but I wonder if any
 of you folks could point me in the right direction or offer advice on
 the situation. Is it crazy to jump from 2.8.6 to 2.12? Does anyone
 use OS X Server for Zope? Is this migration a mistake? Any pitfalls I
 should be looking out for?

I would do this in small steps, e.g. first migrate to the new machine / OS:

- - Get Python 2.3.x installed on the OS/X server.

- - Build the latest Zope 2.8.* on that server.

- - Install and test products there in the same versions  you now use.

- - Copy your old database over and test.

then upgrade the software stack:

- - Move carefully through the Zope releases (I would to 2.9, 2.10, and'
  2.12), upgrading Python as needed  to stay on a supported version.

- - Check for upgrades to the products, and their compatibility with
  Zope versions.  Test them, and your site. after each upgrade.



Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz+jJwACgkQ+gerLs4ltQ5/0wCgujisDb7vxO966ywlxvORAAsZ
vXAAnjpGkfah2Bf0ME29x5dEhhMakNdK
=rSSg
-END PGP SIGNATURE-

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


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-07 Thread Andrew Milton
+---[ Tres Seaver ]--
| -BEGIN PGP SIGNED MESSAGE-
| Hash: SHA1
| 
| On 12/07/2010 01:18 PM, Dan Gaibel wrote:
| 
|  I have recently inherited the responsibility of supporting a fairly
|  complex web server running Zope 2.8.6 on Python 2.3.5. This
|  configuration is currently on a Linux (Fedora Core) server and I
|  would like very much to migrate to OS X Server Snow Leopard. It also
|  seems to me that I should consider upgrading Zope to a more current
|  release while I'm at it. We heavily use MySQL and associated
|  products, LocalFS, and the Python Imagining Library. We have a
|  variety of ZClass homegrown products as well.
|  
|  I know that I'm in for a headache no matter what, but I wonder if any
|  of you folks could point me in the right direction or offer advice on
|  the situation. Is it crazy to jump from 2.8.6 to 2.12? Does anyone
|  use OS X Server for Zope? Is this migration a mistake? Any pitfalls I
|  should be looking out for?
| 
| I would do this in small steps, e.g. first migrate to the new machine / OS:
| 
| - - Get Python 2.3.x installed on the OS/X server.
| 
| - - Build the latest Zope 2.8.* on that server.
| 
| - - Install and test products there in the same versions  you now use.
| 
| - - Copy your old database over and test.
| 
| then upgrade the software stack:
| 
| - - Move carefully through the Zope releases (I would to 2.9, 2.10, and'
|   2.12), upgrading Python as needed  to stay on a supported version.
| 
| - - Check for upgrades to the products, and their compatibility with
|   Zope versions.  Test them, and your site. after each upgrade.

The move from 2.9 to 2.10 is likely to be the most painful part in
terms of legacy Zope apps. A lot of products will break on 2.10

-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Question about Upgrading Zope and OS X Server

2010-12-07 Thread Dan Gaibel
Good advice here, thanks! Is it a big mistake to stay at Zope 2.8.6? The server 
has been very stable for years, apparently. What are the downfalls of not 
upgrading all the way past 2.10?

On Dec 7, 2010, at 2:40 PM, Andrew Milton wrote:

 +---[ Tres Seaver ]--
 | -BEGIN PGP SIGNED MESSAGE-
 | Hash: SHA1
 | 
 | On 12/07/2010 01:18 PM, Dan Gaibel wrote:
 | 
 |  I have recently inherited the responsibility of supporting a fairly
 |  complex web server running Zope 2.8.6 on Python 2.3.5. This
 |  configuration is currently on a Linux (Fedora Core) server and I
 |  would like very much to migrate to OS X Server Snow Leopard. It also
 |  seems to me that I should consider upgrading Zope to a more current
 |  release while I'm at it. We heavily use MySQL and associated
 |  products, LocalFS, and the Python Imagining Library. We have a
 |  variety of ZClass homegrown products as well.
 |  
 |  I know that I'm in for a headache no matter what, but I wonder if any
 |  of you folks could point me in the right direction or offer advice on
 |  the situation. Is it crazy to jump from 2.8.6 to 2.12? Does anyone
 |  use OS X Server for Zope? Is this migration a mistake? Any pitfalls I
 |  should be looking out for?
 | 
 | I would do this in small steps, e.g. first migrate to the new machine / OS:
 | 
 | - - Get Python 2.3.x installed on the OS/X server.
 | 
 | - - Build the latest Zope 2.8.* on that server.
 | 
 | - - Install and test products there in the same versions  you now use.
 | 
 | - - Copy your old database over and test.
 | 
 | then upgrade the software stack:
 | 
 | - - Move carefully through the Zope releases (I would to 2.9, 2.10, and'
 |   2.12), upgrading Python as needed  to stay on a supported version.
 | 
 | - - Check for upgrades to the products, and their compatibility with
 |   Zope versions.  Test them, and your site. after each upgrade.
 
 The move from 2.9 to 2.10 is likely to be the most painful part in
 terms of legacy Zope apps. A lot of products will break on 2.10
 
 -- 
 Andrew Milton
 a...@theinternet.com.au
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

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


[Zope] question about copyng btree elements

2009-12-16 Thread Yuri
Hi!

I've a Zope BTree called answers. It contains PersistentMapping objects:

self.answers[userid] = PersistentMapping(value=value,
 comments=comments)

value can be a string, a list or a dictionary

what happen exactly if I do: question.answers[a_userdid] = 
question.answers[another_user_id] ?

 From my (poor) tests they seems not to share anything, I mean I can 
modify question.answers[a_userdid] and question.answers[another_user_id] 
is untouched.

Is this true? Should I beware of something?
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] question about copyng btree elements

2009-12-16 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yuri wrote:
 Hi!
 
 I've a Zope BTree called answers. It contains PersistentMapping objects:
 
 self.answers[userid] = PersistentMapping(value=value,
  comments=comments)
 
 value can be a string, a list or a dictionary
 
 what happen exactly if I do: question.answers[a_userdid] = 
 question.answers[another_user_id] ?
 
  From my (poor) tests they seems not to share anything, I mean I can 
 modify question.answers[a_userdid] and question.answers[another_user_id] 
 is untouched.
 
 Is this true? Should I beware of something?

I can't reproduce your reported behavior::

- - $ --
$ bin/virtualenv-2.6 --no-site-packages /tmp/yuri
...
$ cd /tmp/yuri/
$ bin/easy_install ZODB3
...
$ bin/python
...
 from BTrees.OOBTree import OOBTree
 from persistent.mapping import PersistentMapping
 answers = OOBTree()
 john = PersistentMapping(value=John's value,
... comment=John's comment)
 answers['john'] = john
 answers['fred'] = answers['john']
 answers['fred'] is john
True
 print john
{'comment': John's comment, 'value': John's value}
 answers['fred']['value'] = Fred's value
 print john
{'comment': John's comment, 'value': Fred's value}
- - $ --


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkspT6MACgkQ+gerLs4ltQ78PgCfRQMXXXDUOSSuViYtBW18muM7
oVYAoK5iL9klE15WBhjvte8KjNNNUUKt
=br64
-END PGP SIGNATURE-

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


[Zope] Question about ZSyncer

2009-07-22 Thread Ajay Deshpande
Hi All:

I would like to know if the ZSyncer product can sync data between two DBs on
the same instance rather than two instances themselves.
Any help is greatly appreciated.

TIA,
R

-- 
And the trees are all kept equal
By hatchet, axe, and saw
___
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] Question about ZSyncer

2009-07-22 Thread Paul Winkler
That is supposed to work, if you enable the relative paths option.
In fact, that was how I did most of my testing when I added that feature.

But I don't work on ZSyncer at all anymore.  If it doesn't work, I
can't really help.

- PW

On Wed, Jul 22, 2009 at 6:20 AM, Ajay Deshpanderiffenst...@gmail.com wrote:
 Hi All:

 I would like to know if the ZSyncer product can sync data between two DBs on
 the same instance rather than two instances themselves.
 Any help is greatly appreciated.

 TIA,
 R

 --
 And the trees are all kept equal
 By hatchet, axe, and saw
 ___
 Zope maillist  -  z...@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://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] Question about InvariantsValidator on a GroupForm (z3c.form)

2009-03-18 Thread Oliver Roch
Hi all,

i'm having a problem getting an InvariantsValidator working on a grouped form 
using z3c.form. Imagine the following setup:

class GroupOne(Group):
fields = Fields(IMyForm).select('second_attribute', 'third_attribute')

class GroupTwo(Group):
fields = Fields(IMyForm).select('fourth_attribute', 'fifth_attribute')

class MyForm(GroupForm, Form):
fields = Fields(IMyForm).select('first_attribute')
groups = (GroupOne, GroupTwo)


Now, the z3c.form.validator.Data object passed to my InvariantsValidator only 
contains the 'first_attribute'. I think this is caused by line 190 in field.py:

def validate(self, data):
fields = self.form.fields.values()

Why is this method only looking for form.fields and not aggregating form.fields 
and possible form.groups?

Is it an unsupported use case, or am i just not getting it?


Thanks,
Oliver
___
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] question about use zc.async in Zope2

2009-03-07 Thread eastxing
Hi all,
In Plone2.5.5(with Zope2.9.6-final) I use zasync as my schedule task
framework, it works well. Then I update my site to Plone3.1.7, and go
further update to use Zope2.11.2 and ZODB3.9.0. Now I want to replace zasync
with zc.async.

As I know in Zope3 there is a event 'zope.app.appsetup.IDatabaseOpenedEvent'
that you can subscribe to start your zc.async dispatcher. But in Zope2.11.2,
the event never be fired, so I have to find other point to start the
dispatcher.

My method is start it when you first use it, see the snip following:

===
class AsyncTool( UniqueObject, SimpleItem, ActionProviderBase ):
...
def addJob( self, *args ):
''' '''
self._startZCAsync()

portal = getToolByName(self,'portal_url').getPortalObject()

# get queue from portal root
queue = zc.async.interfaces.IQueue( portal )

# insert a job
job = queue.put( Job(...) )

def _startZCAsync( self ):
# create volatile attributes
if not hasattr( self, '_v_start_zcasync' ):
self._v_start_zcasync = 0

if not self._v_start_zcasync:
db = Zope2.DB

# zc.async does not startup, start it now
zc.async.configure.base()
zc.async.configure.start( db, poll_interval=1, twisted=False )

self._v_start_zcasync = 1
===

It works, but fragile. Any of my jobs execute failure will cause the
'volatile' attribute '_v_start_zcasync' lost, and dispatcher start process
will run again, this cause error.

So I want to know the right time to start zc.async dispatcher in Zope2?

best regards
eastxing
___
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] Question about URL lookups

2008-12-29 Thread Allen Schmidt Sr.
Sorry if this is too generic a question but thought I would throw it out.
Interested in doing a page that does a ZSQL lookup based URL parts but 
not like a normal db lookup.
I want another way to do:

domain.com/LocalSearchFolder/lookup?category=27state=vacity=Fredericksburg
More like this:
domain.com/LocalSearchFolder/L-Fredericksburg/S-VA/C-Plumbing

And that page (u...DTML preferably) would display the lookup results 
for Plumbing contractors in Fredericksburg, VA.

Any pointers to ideas??

Thanks!
-Allen

___
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] Question about URL lookups

2008-12-29 Thread Jeff Peterson
Script (Python) has a feature called traverse_subpath (you can rename in 
under the bindings tab, but why?) that may do what you want.

Given domain.com/[script name]/L-Fredericksburg/S-VA/C-Plumbing:

request.traverse_subpath should contain ['L-Fredericksburg', 'S-VA', 
'C-Plumbing']

There may be better ways to do this, but this popped immediately for me.

--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.

-Original Message-
From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Allen 
Schmidt Sr.
Sent: Monday, December 29, 2008 9:43 AM
To: zope@zope.org
Subject: [Zope] Question about URL lookups

Sorry if this is too generic a question but thought I would throw it out.
Interested in doing a page that does a ZSQL lookup based URL parts but 
not like a normal db lookup.
I want another way to do:

domain.com/LocalSearchFolder/lookup?category=27state=vacity=Fredericksburg
More like this:
domain.com/LocalSearchFolder/L-Fredericksburg/S-VA/C-Plumbing

And that page (u...DTML preferably) would display the lookup results 
for Plumbing contractors in Fredericksburg, VA.

Any pointers to ideas??

Thanks!
-Allen

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


[Zope] Question about Roles

2008-08-05 Thread Allen Schmidt Sr.

Zope 2.8.9.1

I have a user in the root acl_users but no Roles set. Then I go into the 
folder I want the user to have access in and using Local Roles, I assign 
Manager. Then on the page I use:


dtml-if 'Manager' in _.SecurityGetUser().getRoles()
  show the update and delete form buttons
/dtml-if


For me, with Manager assigned in the root, I can see the buttons. But 
for this user, the buttons are not there. When I dtml-var the above 
getRoles() she only shows as 'Authenticated' but not 'Manager' and I 
show both.


Just wondering why??

Thanks

Allen


___
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] Question about Roles

2008-08-05 Thread Behrens Matt - Grand Rapids
You need to check to see if said user has that role on the object in
question.  getRoles is only going to show you roles assigned in the User
Folder, not local roles.

This code is doing a similar thing on my site, with a different role:

dtml-if expr=_.SecurityGetUser().has_role('Development Manager',
this()) 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Allen Schmidt Sr.
Sent: Tuesday, August 05, 2008 10:38 AM
To: zope@zope.org
Subject: [Zope] Question about Roles

Zope 2.8.9.1

I have a user in the root acl_users but no Roles set. Then I go into the
folder I want the user to have access in and using Local Roles, I assign
Manager. Then on the page I use:

dtml-if 'Manager' in _.SecurityGetUser().getRoles()
   show the update and delete form buttons /dtml-if


For me, with Manager assigned in the root, I can see the buttons. But
for this user, the buttons are not there. When I dtml-var the above
getRoles() she only shows as 'Authenticated' but not 'Manager' and I
show both.

Just wondering why??

Thanks

Allen


___
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] Question about Roles

2008-08-05 Thread Allen Schmidt Sr.

That worked perfectly.
Thanks Matt!

Allen


Behrens Matt - Grand Rapids wrote:

You need to check to see if said user has that role on the object in
question.  getRoles is only going to show you roles assigned in the User
Folder, not local roles.

This code is doing a similar thing on my site, with a different role:

dtml-if expr=_.SecurityGetUser().has_role('Development Manager',
this()) 


___
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] question about cataloging Page Templates

2008-06-24 Thread Erik Myllymaki
In Page Templates that use macros, how would you ensure that the entire 
rendered page is cataloged and returned by a search?


For instance, this template:

metal:block use-macro=here/template1/macros/main
 metal:slot fill-slot=additional-content

tomatoes

 /metal:slot
/metal:block

is returned when you search for tomatoes but is not returned when you 
search on a word that is in the main macro in template1 Page Template.






___
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] Question about adapters

2008-05-09 Thread Martijn Jacobs


Hello guys.

A question about adapters : I've written two adapters wich implement my 
own interface IMyAdapter. The first adapter adapts 
CMFCore.interfaces._content.IFolderish objects and the other one 
CMFCore.interfaces._content.IContentish objects.


One of the base classes of the IFolderish objects also implement the 
IContentish interface, so when I adapt folderish objects with 
IMyAdapter(object), the adapter registered for the IContentish objects 
always wins. (and if it's a folderish object I want the adapter for 
IFolderish to jump in).


In other words : How can I influence the order of adapter lookup?

I'm feeling there should be a simple solution for this (applying a 
marker interface to folderish objects?), so I hope someone can point me 
in the right direction.



Kind regards,



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Question about dot in method name

2008-03-26 Thread Sascha Welter
(Tue, Mar 25, 2008 at 09:36:49PM +0100) bard st?phane wrote/schrieb/egrapse:
 hi every body i'm changing a very old zclass product.
 In this zclass i declare a python script with this name mydoc.xls
 this script return an xls file with an argument
 
 now i'm writing a zope2 product. How can I explain to zope
 that he should publish a certain method with a different name
 so when people type 
 http://myIntranet/folder/mydoc.xls?fileName=hello.xls it point
 to a real python method (dot caracter are forbiden in python class method)

http://betabug.ch/blogs/ch-athens/144
Zope Methods with a Dot in the name

HTH!

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] Question about dot in method name

2008-03-26 Thread stéphane bard
thx sascha
i already imagine a setattr could solve the problem, but i didn't test it
at the real end of any other declaration.
thank's for this tip !
hop you get nice weather in athen

2008/3/26, Sascha Welter [EMAIL PROTECTED]:

 (Tue, Mar 25, 2008 at 09:36:49PM +0100) bard st?phane
 wrote/schrieb/egrapse:

  hi every body i'm changing a very old zclass product.
  In this zclass i declare a python script with this name mydoc.xls
  this script return an xls file with an argument
 
  now i'm writing a zope2 product. How can I explain to zope
  that he should publish a certain method with a different name
  so when people type
  http://myIntranet/folder/mydoc.xls?fileName=hello.xls it point
  to a real python method (dot caracter are forbiden in python class
 method)


 http://betabug.ch/blogs/ch-athens/144
 Zope Methods with a Dot in the name

 HTH!

 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 )

___
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] Question about dot in method name

2008-03-25 Thread bard stéphane

hi every body i'm changing a very old zclass product.
In this zclass i declare a python script with this name mydoc.xls
this script return an xls file with an argument

now i'm writing a zope2 product. How can I explain to zope
that he should publish a certain method with a different name
so when people type 
http://myIntranet/folder/mydoc.xls?fileName=hello.xls it point

to a real python method (dot caracter are forbiden in python class method)

mydoc.xls = mydoc_xls(REQUEST=None)

I know that Zclasses are bad :) , but I cannot change this URL, because
lot's of people record it.

thank's a lot for an advice.

___
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] Question about dot in method name

2008-03-25 Thread bard stéphane

hi every body i'm changing a very old zclass product.
In this zclass i declare a python script with this name mydoc.xls
this script return an xls file with an argument

now i'm writing a zope2 product. How can I explain to zope
that he should publish a certain method with a different name
so when people type 
http://myIntranet/folder/mydoc.xls?fileName=hello.xls it point

to a real python method (dot caracter are forbiden in python class method)

mydoc.xls = mydoc_xls(REQUEST=None)


I know that Zclasses are bad :), but I cannot change this URL, because
lot's of people record it.

thank's a lot for an advice.
___
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] Question about dot in method name

2008-03-25 Thread Martijn Jacobs


Maybe a simple solution  :

Do you use apache as a frontend for your zope? If you do you can rewrite 
the incoming url's for example like this :


RewriteEngine On
RewriteRule ^/folder/mydoc.xls(.*) 
http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1 
[L,P]





hi every body i'm changing a very old zclass product.
In this zclass i declare a python script with this name mydoc.xls
this script return an xls file with an argument

now i'm writing a zope2 product. How can I explain to zope
that he should publish a certain method with a different name
so when people type 
http://myIntranet/folder/mydoc.xls?fileName=hello.xls it point
to a real python method (dot caracter are forbiden in python class 
method)


mydoc.xls = mydoc_xls(REQUEST=None)

I know that Zclasses are bad :) , but I cannot change this URL, because
lot's of people record it.

thank's a lot for an advice.

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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Question about AdvancedQuery

2007-07-26 Thread julian

Hi,

I want use a query like :
query['getPresta_chambres'] = { 'query': [15], 'range': 'min' }

But with AdvancedQuery I don't see how make it :
-
query = And(Eq('portal_type', 'Meubles'))
query = query  Eq('review_state', 'published')

# This query don't run :
query = query  Eq('getPresta_chambres', { 'query': [15],'range': 'min' })
-

Could you help me :p ?

Julian

___
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] basic python class zope question

2007-06-13 Thread Winterflood, Jonathan

 De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de 
 Tudor Gabriel
 Envoyé : mercredi 13 juin 2007 01:54
 À : zope@zope.org
 Objet : [Zope] basic python class  zope question
 
 hi im new here , first post ... and new to zope.
 
 i've read the manual ... and zope framework looks very promising ... 
 i started writing a couple of templates ... and run into some basic 
 problems like:
 
 Problem 1.
 is it posible to have a python class ... defined in a script  like
 class learn:
def print_something(self):
   print 'it works'
 
 
 and call it from zpt ... like span 
 tal:replace=learn/print_somethingreplace/span? 
 
 or how can i call a method from this object ? ... i tryied with 
 python:learn.print_something() and many different ways and i still 
 don't get it.
 
 i'm starting to suspect that i can use classes only as zope products  
 and call from zpt ... only scripts without classes.
 
 also do i have to set the properties/attributes of the script which 
 contains the class ... with the methods?
 
 because by calling learn/print_somthing i get an AttributeError ... url 
 might be invalid etc... 
 
 Problem 2.
 
 how can i call/return from an python script a html file which resides in 
 some folder above the script.
 
 i wanna call abc/index.html ... from abc/def/script.py
 
 i tryied with the container[' index.html'[ but it doesn't return anything.
 
 thank you for the patience and sorry for the very basic questions ... but 
 i feel that if i understand this things ... i can really get started with
 zope.


Hi,

 or how can i call a method from this object ?
To call a method of a class, you first have to possess an instance of that 
class in a variable. Then, supporing the variable is lrn_instance, you can use 
lrn_instance/print_something or python:lrn_instance.print_something() to call 
it.

 is it posible to have a python class ... defined in a script

 because by calling learn/print_somthing i get an AttributeError
It should be possible to define a class in a script, but the script won't 
become that class, you will have to have that script return an instance of the 
class, and then you store it somewhere (a variable maybe, or a property of some 
other object if you want it to persist). As far as I can tell, it would 
probably be wiser to define the class in a Product, though.

 how can i call/return from an python script a html file which resides...
This behaviour is built into Zope and is called acquisition: anything defined 
above your context is accessible as if it were in your context, as long as it 
isn't obscured by something else with the same name.

The things you want to access will lose their extension, by the way: 
index_html.pt will become index_html, the same way that script.py becomes script

From abc/def/script.py, context.index_html() should give you the rendering 
of abc/index_html.whatever_it_is


Hope this helps,
Jonathan

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.

___
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] basic python class zope question

2007-06-12 Thread Tudor Gabriel

hi im new here , first post ... and new to zope.

i've read the manual ... and zope framework looks very promising ...
i started writing a couple of templates ... and run into some basic problems
like:

Problem 1.
is it posible to have a python class ... defined in a script  like
class learn:
  def print_something(self):
 print 'it works'


and call it from zpt ... like span
tal:replace=learn/print_somethingreplace/span?

or how can i call a method from this object ? ... i tryied with python:
learn.print_something() and many different ways and i still don't get it.

i'm starting to suspect that i can use classes only as zope products ...
and call from zpt ... only scripts without classes.

also do i have to set the properties/attributes of the script which contains
the class ... with the methods?

because by calling learn/print_somthing i get an AttributeError ... url
might be invalid etc...

Problem 2.

how can i call/return from an python script a html file which resides in
some folder above the script.

i wanna call abc/index.html ... from abc/def/script.py

i tryied with the container['index.html'[ but it doesn't return anything.

thank you for the patience and sorry for the very basic questions ... but i
feel that if i understand this things ... i can really get started with
zope.
___
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] question on URL styling

2006-09-11 Thread Erik Myllymaki

I am making a survey that has many very similar pages all in one directory.
The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' and one for 
'Previous' so that I catch changes to the form elements in each direction. I 
use a python script as index_html, and hit it on each submit (form 
action=.), and then redirect to the appropriate page, whether that page is 
current_page++ or current_page--. I also stuff all form variables into SESSION 
in the index_html python script.


What I am wondering though, is how to display the 'page' portion of the address 
- right now it always just displays as http://myzopesite.com/workingdirectory/


I would like it to display http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always going to 
index_html and returning the page via return container[next_page](context, 
request) I never see this part in the URL.


Thanks for any suggestions.




___
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] question on URL styling

2006-09-11 Thread Jonathan


- Original Message - 
From: Erik Myllymaki [EMAIL PROTECTED]

To: zope@zope.org
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling



I am making a survey that has many very similar pages all in one directory.
The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' and one 
for 'Previous' so that I catch changes to the form elements in each 
direction. I use a python script as index_html, and hit it on each submit 
(form action=.), and then redirect to the appropriate page, whether 
that page is current_page++ or current_page--. I also stuff all form 
variables into SESSION in the index_html python script.


What I am wondering though, is how to display the 'page' portion of the 
address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always going 
to index_html and returning the page via return 
container[next_page](context, request) I never see this part in the URL.


One possible work-around is to rename your python script, reformat your urls 
and use traverse_subpath to access the page to be displayed.  eg.  if you 
name your script 'displayPage', then you can have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



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] question on URL styling

2006-09-11 Thread Erik Myllymaki


I'm trying this out and it seems to be working:

request.RESPONSE.redirect(context[next_page].absolute_url())

is this the *correct* way to do it?



Erik Myllymaki wrote:

I am making a survey that has many very similar pages all in one directory.
The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' and 
one for 'Previous' so that I catch changes to the form elements in each 
direction. I use a python script as index_html, and hit it on each 
submit (form action=.), and then redirect to the appropriate page, 
whether that page is current_page++ or current_page--. I also stuff all 
form variables into SESSION in the index_html python script.


What I am wondering though, is how to display the 'page' portion of the 
address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via return 
container[next_page](context, request) I never see this part in the URL.


Thanks for any suggestions.




___
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] question on URL styling

2006-09-11 Thread David H

Jonathan wrote:



- Original Message - From: Erik Myllymaki 
[EMAIL PROTECTED]

To: zope@zope.org
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling


I am making a survey that has many very similar pages all in one 
directory.

The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' 
and one for 'Previous' so that I catch changes to the form elements 
in each direction. I use a python script as index_html, and hit it on 
each submit (form action=.), and then redirect to the appropriate 
page, whether that page is current_page++ or current_page--. I also 
stuff all form variables into SESSION in the index_html python script.


What I am wondering though, is how to display the 'page' portion of 
the address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via return 
container[next_page](context, request) I never see this part in the 
URL.



One possible work-around is to rename your python script, reformat 
your urls and use traverse_subpath to access the page to be 
displayed.  eg.  if you name your script 'displayPage', then you can 
have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



hth

Jonathan


Erik,
I find your use case a bit strange.  Why would your users need to see 
different URLs?  Doesnt that pollute their browser's history list - and 
do you want them clicking some Page-nn from history? 

I like the idea of using a python script as index_html and using it as a 
router.  Instead of a redirect I use


return someZpt(context, request)

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 )


Re: [Zope] question on URL styling

2006-09-11 Thread Erik Myllymaki



David H wrote:

Jonathan wrote:



- Original Message - From: Erik Myllymaki 
[EMAIL PROTECTED]

To: zope@zope.org
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling


I am making a survey that has many very similar pages all in one 
directory.

The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' 
and one for 'Previous' so that I catch changes to the form elements 
in each direction. I use a python script as index_html, and hit it on 
each submit (form action=.), and then redirect to the appropriate 
page, whether that page is current_page++ or current_page--. I also 
stuff all form variables into SESSION in the index_html python script.


What I am wondering though, is how to display the 'page' portion of 
the address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via return 
container[next_page](context, request) I never see this part in the 
URL.



One possible work-around is to rename your python script, reformat 
your urls and use traverse_subpath to access the page to be 
displayed.  eg.  if you name your script 'displayPage', then you can 
have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



hth

Jonathan


Erik,
I find your use case a bit strange.  Why would your users need to see 
different URLs?  Doesnt that pollute their browser's history list - and 
do you want them clicking some Page-nn from history?


I'm not too sure I understand the pollution reference...do you mean that it 
would make sense that an end user would only ever bookmark to the start of the 
survey, and not half way through?


I guess it's more for me and the designers then for end users.

After the user goes through the 30+ pages of survey questions, they are
presented with a summary page which basically shows all the 'Q's and 'A's and 
their contact info on one big page Hi, JOE from CALGARY, you told us that your 
favourite colour is GREEN, your favourite fruit is a BANANA ... etc..


There are links beside each answer so that they can go back and change that 
answer before submitting the survey if they wish. So, they should have access 
to each and every page by name and they can jump around within the survey.




___
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] question on URL styling

2006-09-11 Thread David H

Erik Myllymaki wrote:




David H wrote:


Jonathan wrote:



- Original Message - From: Erik Myllymaki 
[EMAIL PROTECTED]

To: zope@zope.org
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling


I am making a survey that has many very similar pages all in one 
directory.
The page templates are called page-1.html, page-2.html, ... 
page-n.html.


I am using two submit buttons on each of the pages; one for 'Next' 
and one for 'Previous' so that I catch changes to the form elements 
in each direction. I use a python script as index_html, and hit it 
on each submit (form action=.), and then redirect to the 
appropriate page, whether that page is current_page++ or 
current_page--. I also stuff all form variables into SESSION in the 
index_html python script.


What I am wondering though, is how to display the 'page' portion of 
the address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via return 
container[next_page](context, request) I never see this part in 
the URL.




One possible work-around is to rename your python script, reformat 
your urls and use traverse_subpath to access the page to be 
displayed.  eg.  if you name your script 'displayPage', then you can 
have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



hth

Jonathan


Erik,
I find your use case a bit strange.  Why would your users need to 
see different URLs?  Doesnt that pollute their browser's history list 
- and do you want them clicking some Page-nn from history?



I'm not too sure I understand the pollution reference...do you mean 
that it would make sense that an end user would only ever bookmark to 
the start of the survey, and not half way through?


I guess it's more for me and the designers then for end users.

After the user goes through the 30+ pages of survey questions, they are
presented with a summary page which basically shows all the 'Q's and 
'A's and their contact info on one big page Hi, JOE from CALGARY, you 
told us that your favourite colour is GREEN, your favourite fruit is a 
BANANA ... etc..


There are links beside each answer so that they can go back and change 
that answer before submitting the survey if they wish. So, they should 
have access to each and every page by name and they can jump around 
within the survey.





If you have users that will fill out 30+ pages of any survey I want your 
mailing list. :-)


Also, you might try a page legend?  I use stuff like that for large 
charts of accounts (no one wants to click  click click to get to even 
the middle of a page list)


I hope your project does well!

All best erik,
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 )


Re: [Zope] question on URL styling

2006-09-11 Thread Erik Myllymaki



David H wrote:

Erik Myllymaki wrote:




David H wrote:


Jonathan wrote:



- Original Message - From: Erik Myllymaki 
[EMAIL PROTECTED]

To: zope@zope.org
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling


I am making a survey that has many very similar pages all in one 
directory.
The page templates are called page-1.html, page-2.html, ... 
page-n.html.


I am using two submit buttons on each of the pages; one for 'Next' 
and one for 'Previous' so that I catch changes to the form elements 
in each direction. I use a python script as index_html, and hit it 
on each submit (form action=.), and then redirect to the 
appropriate page, whether that page is current_page++ or 
current_page--. I also stuff all form variables into SESSION in the 
index_html python script.


What I am wondering though, is how to display the 'page' portion of 
the address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via return 
container[next_page](context, request) I never see this part in 
the URL.




One possible work-around is to rename your python script, reformat 
your urls and use traverse_subpath to access the page to be 
displayed.  eg.  if you name your script 'displayPage', then you can 
have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



hth

Jonathan


Erik,
I find your use case a bit strange.  Why would your users need to 
see different URLs?  Doesnt that pollute their browser's history list 
- and do you want them clicking some Page-nn from history?



I'm not too sure I understand the pollution reference...do you mean 
that it would make sense that an end user would only ever bookmark to 
the start of the survey, and not half way through?


I guess it's more for me and the designers then for end users.

After the user goes through the 30+ pages of survey questions, they are
presented with a summary page which basically shows all the 'Q's and 
'A's and their contact info on one big page Hi, JOE from CALGARY, you 
told us that your favourite colour is GREEN, your favourite fruit is a 
BANANA ... etc..


There are links beside each answer so that they can go back and change 
that answer before submitting the survey if they wish. So, they should 
have access to each and every page by name and they can jump around 
within the survey.





If you have users that will fill out 30+ pages of any survey I want your 
mailing list. :-)


we'll call them a captive audience :)


___
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] Question of ZPL etiquette

2006-08-08 Thread David Pratt
Hi Andreas. I had interpreted that the header information was satisfying 
the requirement to identify changes for


5. If any files are modified, you must cause the modified files to carry 
prominent notices stating that you changed the files and the date of any 
change.


Since I am under version control and date is in $Id$, I was just going 
to indicate a statement Modified ZPL 2.1(5) code under my $Id$ then 
use my own header with reference to the LICENSE.txt Would you say this 
is a reasonable way to go? Many thanks.


Regards,
David

Andreas Jung wrote:



--On 8. August 2006 00:53:09 -0300 David Pratt [EMAIL PROTECTED] 
wrote:



Hi. I am trying to get a better sense of how others are dealing with ZPL
headers in code from original authors once changes are made. For example
if a package is ZPL copyright somebody, I typically see a header at the
top of most files as well as the LICENSE.txt in the package itself. When
changes are made however, it is typical see headers replaced with the
header of the author(s) who have made changes and date. A second license
will now apply to the modified package with the ZPL license of the
original code left to acknowledge authors and copyright of the original
product/package. Is that a fair assessment? Is that generally acceptable?
Many thanks.



The ZPL does not  tell what to put into header of your files. My source 
basically contains a reference to some LICENSE file in the root directoy.
This file contains the main license (e.g. ZPL) but it also mentions all 
code parts that are published under a different license. So you have 
everything in one place and you don't have to modify all headers as soon 
as something changes with your licenses.


-aj

___
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] Question of ZPL etiquette

2006-08-07 Thread David Pratt
Hi. I am trying to get a better sense of how others are dealing with ZPL 
headers in code from original authors once changes are made. For example 
if a package is ZPL copyright somebody, I typically see a header at the 
top of most files as well as the LICENSE.txt in the package itself. When 
changes are made however, it is typical see headers replaced with the 
header of the author(s) who have made changes and date. A second license 
will now apply to the modified package with the ZPL license of the 
original code left to acknowledge authors and copyright of the original 
product/package. Is that a fair assessment? Is that generally 
acceptable? Many thanks.


Regards,
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 )


Re: [Zope] Question of ZPL etiquette

2006-08-07 Thread Andreas Jung



--On 8. August 2006 00:53:09 -0300 David Pratt [EMAIL PROTECTED] 
wrote:



Hi. I am trying to get a better sense of how others are dealing with ZPL
headers in code from original authors once changes are made. For example
if a package is ZPL copyright somebody, I typically see a header at the
top of most files as well as the LICENSE.txt in the package itself. When
changes are made however, it is typical see headers replaced with the
header of the author(s) who have made changes and date. A second license
will now apply to the modified package with the ZPL license of the
original code left to acknowledge authors and copyright of the original
product/package. Is that a fair assessment? Is that generally acceptable?
Many thanks.



The ZPL does not  tell what to put into header of your files. My source 
basically contains a reference to some LICENSE file in the root directoy.
This file contains the main license (e.g. ZPL) but it also mentions all 
code parts that are published under a different license. So you have 
everything in one place and you don't have to modify all headers as soon as 
something changes with your licenses.


-aj

pgpS6u9fUxG0X.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] question on simple_send in MailHost

2006-07-19 Thread John Schinnerer

Aloha,

Thanks all for the suggestions...for the time being I can do what I need 
by sending to only one address.
It was trying to test the send by sending to multiple addresses (mine 
and others') that brought this out...

I will try a list next time I need multiple addresses in the To: field.

thanks,
John S.

Jonathan wrote:


- Original Message - From: John Schinnerer [EMAIL PROTECTED]
To: zope@zope.org
Sent: Sunday, July 16, 2006 11:49 PM
Subject: [Zope] question on simple_send in MailHost



Aloha,

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

Sends a message. Only To:, From: and Subject: headers can be set. 
The arguments are:


mto
A commaseparated string or list of recipient(s) of the message.
mfrom
The address of the message sender.
subject
The subject of the message.
body
The body of the message.
--

So it reads like it can handle more than one To: address, something 
like this comma-separated string:


'[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]'

...but when I do this the message only gets sent to the first address 
in the list.




I have never used simple_send..., but have you tried putting the 'To' 
addresses in a list format, eg. ['addr1', 'addr2', ...]?  - if you 
already have a comma-separated string you can easily pass this as a list 
with something like:  string.split(addressString, ',').



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 )



--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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] question on simple_send in MailHost

2006-07-19 Thread Andreas Jung



--On 18. Juli 2006 21:23:59 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:



Aloha,

Thanks all for the suggestions...for the time being I can do what I need
by sending to only one address.
It was trying to test the send by sending to multiple addresses (mine and
others') that brought this out...
I will try a list next time I need multiple addresses in the To: field.


Why don't you use the send() method which works perfectly fine with multiple
recipient addresses???

-aj



pgpd01yeD4Zfo.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] question on simple_send in MailHost

2006-07-19 Thread John Schinnerer

Aloha,

I did try send() - it seems one must know something about RFC822 message 
formatting to use it...?
I know nothing about that, and could not quickly find any clear and 
concise howtos or tutorials, just verbose and confusing specs and 
mailing list posts and so on.


I tried using send() with the same plain text body and from and to 
strings I was using for simple_send()...in case it might work...
When the mail arrived, some of the header content was in the body and 
not in the header.

It did arrive at all addresses in the To: field, I will admit... :-)
But the header was broken somehow, I assume because I didn't know how to 
format it correctly.

That was all the time I had to mess with it for now.

thanks,
John S.

Andreas Jung wrote:



--On 18. Juli 2006 21:23:59 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:



Aloha,

Thanks all for the suggestions...for the time being I can do what I need
by sending to only one address.
It was trying to test the send by sending to multiple addresses (mine and
others') that brought this out...
I will try a list next time I need multiple addresses in the To: field.



Why don't you use the send() method which works perfectly fine with 
multiple

recipient addresses???

-aj





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


--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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] question on simple_send in MailHost

2006-07-19 Thread Andreas Jung



--On 18. Juli 2006 21:55:36 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:



Aloha,

I did try send() - it seems one must know something about RFC822 message
formatting to use it...?
I know nothing about that, and could not quickly find any clear and
concise howtos or tutorials, just verbose and confusing specs and mailing
list posts and so on.


Nonsense. The Python 'email' module is perfectly suited and documented 
(with examples). We use the 'email' module in various places for generating 
rfc822 compliant emails that are send through MailHost.send().


-aj

pgpTYhJi1eQ5c.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] question on simple_send in MailHost

2006-07-19 Thread Tino Wildenhain

Andreas Jung wrote:



--On 18. Juli 2006 21:55:36 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:



Aloha,

I did try send() - it seems one must know something about RFC822 message
formatting to use it...?
I know nothing about that, and could not quickly find any clear and
concise howtos or tutorials, just verbose and confusing specs and mailing
list posts and so on.


Nonsense. The Python 'email' module is perfectly suited and documented 
(with examples). We use the 'email' module in various places for 
generating rfc822 compliant emails that are send through MailHost.send().


So you are writing a Product to enable it to python scripting? .-))

Well, its so easy... some of the beginners should be able to do it.

from AccessControl import allow_module, allow_class, allow_type

from formatter import BlockFormatter
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Header import Header
from MailCrypt import signmail
from email.Encoders import encode_base64

allow_class(BlockFormatter)
allow_class(MIMEBase)
allow_class(MIMEText)
allow_class(MIMEMultipart)
allow_class(Header)
allow_class(signmail)
allow_class(encode_base64)


would roughly do it.
Pack it nicely, add some ZMI howtos
and be ready :-)

Regards
Tino Wildenhain
___
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] question on simple_send in MailHost

2006-07-17 Thread knitti

On 7/17/06, John Schinnerer [EMAIL PROTECTED] wrote:

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

 Sends a message. Only To:, From: and Subject: headers can be set.
The arguments are:

 mto
 A commaseparated string or list of recipient(s) of the message.
 mfrom
 The address of the message sender.
 subject
 The subject of the message.
 body
 The body of the message.
--


a bit digging in the code on one of my installations (2.7.4) revealed,
that Zope more or less directly invokes  SMTP.sendmail from smtplib
of python. quote from the docs: a list of RFC 822 to-address strings
(a bare string will be treated as a list with 1 address)

this seems a small bug in zope (either implementation or
documentation). for a fix, make the list yourself:

yourstring.split(',')

this _could_ break the RFC-conformity of the to-header of the message,
because simple_send builds the body of the message like this:

body=From: %s\nTo: %s\nSubject: %s\n\n%s \
   % (mfrom, mto, subject, body)

which would result in

To: ['[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]']

which makes the message unroutable.

I suggest this code for MailBase.simple_send() (Malhost.py):

import types # this belongs into the import section

[.. snip, in simple_send: ..]

def simple_send(self, mto, mfrom, subject, body):
   if type(mto)==types.ListType:
   body = From: %s\nTo: %s\nSubject: %s\n\n%s \
   % (mfrom, ','.join(mto), subject, body)
   else:
   body = From: %s\nTo: %s\nSubject: %s\n\n%s \
   % (mfrom, mto, subject, body)
   self._send(mfrom, mto, body)

and change the documentation to accept lists and strings,
because parsing a comma-separated list of true rfc-822
addresses is far more complicarted than somestring.split(',')

--knitti
___
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] question on simple_send in MailHost

2006-07-17 Thread knitti

i'd like to mention that I didn't test that code

--knitti
___
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] question on simple_send in MailHost

2006-07-17 Thread Andreas Jung

Put this in the bugtracker...otherwise it will be lost.

-aj

--On 17. Juli 2006 11:29:07 +0200 knitti [EMAIL PROTECTED] wrote:


On 7/17/06, John Schinnerer [EMAIL PROTECTED] wrote:

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

 Sends a message. Only To:, From: and Subject: headers can be set.
The arguments are:

 mto
 A commaseparated string or list of recipient(s) of the message.
 mfrom
 The address of the message sender.
 subject
 The subject of the message.
 body
 The body of the message.
--


a bit digging in the code on one of my installations (2.7.4) revealed,
that Zope more or less directly invokes  SMTP.sendmail from smtplib
of python. quote from the docs: a list of RFC 822 to-address strings
(a bare string will be treated as a list with 1 address)

this seems a small bug in zope (either implementation or
documentation). for a fix, make the list yourself:

yourstring.split(',')

this _could_ break the RFC-conformity of the to-header of the message,
because simple_send builds the body of the message like this:

body=From: %s\nTo: %s\nSubject: %s\n\n%s \
% (mfrom, mto, subject, body)

which would result in

To: ['[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]']

which makes the message unroutable.

I suggest this code for MailBase.simple_send() (Malhost.py):

import types # this belongs into the import section

[.. snip, in simple_send: ..]

def simple_send(self, mto, mfrom, subject, body):
if type(mto)==types.ListType:
body = From: %s\nTo: %s\nSubject: %s\n\n%s \
% (mfrom, ','.join(mto), subject, body)
else:
body = From: %s\nTo: %s\nSubject: %s\n\n%s \
% (mfrom, mto, subject, body)
self._send(mfrom, mto, body)

and change the documentation to accept lists and strings,
because parsing a comma-separated list of true rfc-822
addresses is far more complicarted than somestring.split(',')

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




--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting


pgpwU6xYWO0ti.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] question on simple_send in MailHost

2006-07-17 Thread knitti

On 7/17/06, Andreas Jung [EMAIL PROTECTED] wrote:

Put this in the bugtracker...otherwise it will be lost.


will do on one of the next days...

--knitti
___
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] question on simple_send in MailHost

2006-07-17 Thread Jonathan


- Original Message - 
From: John Schinnerer [EMAIL PROTECTED]

To: zope@zope.org
Sent: Sunday, July 16, 2006 11:49 PM
Subject: [Zope] question on simple_send in MailHost



Aloha,

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

Sends a message. Only To:, From: and Subject: headers can be set. The 
arguments are:


mto
A commaseparated string or list of recipient(s) of the message.
mfrom
The address of the message sender.
subject
The subject of the message.
body
The body of the message.
--

So it reads like it can handle more than one To: address, something like 
this comma-separated string:


'[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]'

...but when I do this the message only gets sent to the first address in 
the list.




I have never used simple_send..., but have you tried putting the 'To' 
addresses in a list format, eg. ['addr1', 'addr2', ...]?  - if you already 
have a comma-separated string you can easily pass this as a list with 
something like:  string.split(addressString, ',').



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 )


[Zope] question on simple_send in MailHost

2006-07-16 Thread John Schinnerer

Aloha,

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

Sends a message. Only To:, From: and Subject: headers can be set. 
The arguments are:


mto
A commaseparated string or list of recipient(s) of the message.
mfrom
The address of the message sender.
subject
The subject of the message.
body
The body of the message.
--

So it reads like it can handle more than one To: address, something like 
this comma-separated string:


'[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]'

...but when I do this the message only gets sent to the first address in 
the list.


Is this a mistake in the docs - do I need to use send() to send to 
multiple addresses?


Or is there something wrong with my comma-separated string of recipients?

Or is there a third possibility I haven't even considered... :-)

thanks,
John S.

--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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] Python Generators and Zope question

2006-04-20 Thread Palermo, Tom



All,

I have a site that uses 
CookieCrumbler for user login. I need to track how many incorrectlogin 
attempts a user makes. I am trying to use a python generator to do this but it 
makes Zope hang when I try to do an invalid login (eg. no password or incorrect 
password). Here's a snippet:

def 
make_counter(x): while 
1: yield 
x x = x + 
1

 counter = 
make_counter(1)

 
security.declarePublic('getUnauthorizedURL') def 
getUnauthorizedURL(self): 
''' Redirects to the login 
page. 
''' req = 
self.REQUEST resp = 
req['RESPONSE'] attempt = 
getattr(req, '_cookie_auth', 
ATTEMPT_NONE) if attempt == 
ATTEMPT_NONE: 
# An anonymous user was denied access to 
something. 
page_id = 
self.auto_login_page 
retry = '' elif attempt == 
ATTEMPT_LOGIN: 
# The login attempt failed. Try 
again. 
page_id = 
self.auto_login_page 
#retry = 
'1' retry 
= counter.next()

I added the make_counter 
function. It seems the culprit is the retry = counter.next() bit. I tried doing 
this same thing with the make_counter function in an External method and then 
calling it from a python script like so:
counter = 
context.make_counter(1)
return 
counter.next()

In that case, an unauthorized 
exception is raised complaining about next. I can however, just return the 
counter which gives me generator object at 0xb48d56cc. Am I calling the 
next method incorrectly or is there something else I'm missing or being dumb 
about?

Thanks,
Tom 
Palermo
___
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] Python Generators and Zope question

2006-04-20 Thread Dieter Maurer
Palermo, Tom wrote at 2006-4-20 10:52 -0400:
I have a site that uses CookieCrumbler for user login. I need to track how
many incorrect login attempts a user makes. I am trying to use a python
generator to do this but it makes Zope hang when I try to do an invalid
login (eg. no password or incorrect password). Here's a snippet:

I fear you are on the wrong way.

  You must store the number of incorrect login attempts with
  the user.

  For this, you should use a standard integer (and not a generator).

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


Re: [Zope] Question about Zope and security

2006-04-01 Thread Dieter Maurer
Cyrille Bonnet wrote at 2006-3-30 14:43 +1200:
 ...
I did find Dieter Mauer's DigestAuth product: 
http://www.dieter.handshake.de/pyprojects/zope/#DigestAuth

It looks good. I have used other produts from Dieter before and was very 
pleased with the quality of his code.

Now, have other people used it? Does it work with WebDAV?

It should work with WebDAV, provided the WebDAV client supports
HTTP Digest Authentication.

How secure is 
it (I am no security/encryption expert)?

The corresponding RFC (RFC 2617) explains in detail how
secure the basic mechanism is.

My DigestAuth DigestAuthCrumber adds a bit of insecurity:

  *  the passwords must be stored (inside Zope (!) not in the request)
 in plain text.

 This could be improved a bit, either by

   - using two way encryption -- but Zope must be able to get
 the plain text password back.

   - fixing the domain and using storing the MD5 hash
 of username, password and domain instead of the
 plain text password.

 Other authentication schemes would then need to
 be changed -- to use the same MD5 hash.

Also, if it is good, why is not part of default Zope??


There are two sides of an answer: the Zope developpers/maintainers side
and my side.

Adding even a good package to the core means a (rather) long term
commitment to support and maintain this package. When you
follow comp.lang.python (or the corresponding mailing list),
you see how reluctant the Python developpers are to include
additional packages into the Python core -- to avoid these
responsibilities. The Zope maintainers are even stricter: they
look what they can get rid of rather than what they can include

On my side: developping for the Zope core imposes much more overhead
than developping independently: I would have to make a proposal,
follow (partially stupid) style guides, add more tests (than
necessary to convince me that the quality is sufficient)...
Thus, I am reluctant to develop for the Zope core.

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


Re: [Zope] Question about Zope and security

2006-03-30 Thread bruno desthuilliers
Cyrille Bonnet wrote:
 Hi there,
 
 I have been telling all my clients about how great Zope is for security:
 fine-grained permissions, security framework, roles, etc.
 
 Now, one of my clients has a security expert who took a close look at
 how Zope authenticates users. The results were not good.
 
 The main problem is that Zope stores the username and password in a
 cookie in clear text (base64 encoded).

*Zope* don't do that. It's the (infamous) CookieCrumbler products that
is responsible for this horror.

 Even though it only happens in their internal network, my client wasn't
 too happy, because it makes them vulnerable to a man-in-the-middle attack.
 
 I know, the odds of that happening are low, but storing the username and
 password in clear text is clearly not best practice.

That's an understatement.

 So, my question is: is there a way to secure Zope authentication?

yes : use https.

-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.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] Question about Zope and security

2006-03-30 Thread Andrew Milton
+---[ bruno desthuilliers ]--
| Cyrille Bonnet wrote:
|  Hi there,
|  
|  I have been telling all my clients about how great Zope is for security:
|  fine-grained permissions, security framework, roles, etc.
|  
|  Now, one of my clients has a security expert who took a close look at
|  how Zope authenticates users. The results were not good.
|  
|  The main problem is that Zope stores the username and password in a
|  cookie in clear text (base64 encoded).
| 
| *Zope* don't do that. It's the (infamous) CookieCrumbler products that
| is responsible for this horror.

Lots of UserFolders do this by default for compatibility reasons.
CookieCrumbler is just following a long tradition.

It's EXACTLY the same as what you get with Basic Auth.

exUserFolder has a mode uses a random hash for cookies (I'm sure other
UserFolders have this option as well). But as others have said, if 
you're posting to a form and not using https, what's the point.

-- 
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] Question about Zope and security

2006-03-29 Thread Cyrille Bonnet

Hi there,

I have been telling all my clients about how great Zope is for security: 
fine-grained permissions, security framework, roles, etc.


Now, one of my clients has a security expert who took a close look at 
how Zope authenticates users. The results were not good.


The main problem is that Zope stores the username and password in a 
cookie in clear text (base64 encoded).


Even though it only happens in their internal network, my client wasn't 
too happy, because it makes them vulnerable to a man-in-the-middle attack.


I know, the odds of that happening are low, but storing the username and 
password in clear text is clearly not best practice.


So, my question is: is there a way to secure Zope authentication?

I did find Dieter Mauer's DigestAuth product: 
http://www.dieter.handshake.de/pyprojects/zope/#DigestAuth


It looks good. I have used other produts from Dieter before and was very 
pleased with the quality of his code.


Now, have other people used it? Does it work with WebDAV? How secure is 
it (I am no security/encryption expert)?


Also, if it is good, why is not part of default Zope??

Finally, a little side story: you know how in Windows XP, you can 
connect a drive to a WebDAV server? Well, if you install Service Pack 2, 
you can't use that feature to connect to Zope anymore. Interestingly 
enough, it seems that it is precisely because of that authentication 
vlunerability: Win XP SP2 refuses to connect to a WebDAV that doesn't at 
least encode the username/password in Digest authentication...


Any comment or pointers are very welcome.


Cyrille

___
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] Question about Zope and security

2006-03-29 Thread Terry Hancock

Cyrille Bonnet wrote:

The main problem is that Zope stores the username and password in a 
cookie in clear text (base64 encoded).


Even though it only happens in their internal network, my client 
wasn't too happy, because it makes them vulnerable to a 
man-in-the-middle attack.


I know, the odds of that happening are low, but storing the username 
and password in clear text is clearly not best practice.


So, my question is: is there a way to secure Zope authentication?

Stock Zope doesn't use cookie authentication, so you're actually talking 
about
an alternate user folder product (which you don't specify and I don't 
know that

many of them, so I can't really comment much -- except that SimpleUserFolder
with CookieCrumbler will indeed put you in this situation (or did the 
last time

I checked)).

The fact that Zope stores passwords as plain text is not the issue if 
you're worried
about man-in-the-middle attacks, though. The problem there is that you 
are passing
passwords plain text in the request, and there is almost no way around 
that unless you run an SSL (HTTPS) server.  Which you should if you want 
real security.


Encrypting your password database without moving your server login to HTTPS
is only going to create inconvenience without improved security (you can no
longer send password reminders, for example) -- it's a false sense of 
security.


So, IMHO, secure the server, then worry about password databases.

Cheers,
Terry

___
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] Question about Zope and security

2006-03-29 Thread Tino Wildenhain
Cyrille Bonnet wrote:
 Hi there,
 
 I have been telling all my clients about how great Zope is for security:
 fine-grained permissions, security framework, roles, etc.
 
 Now, one of my clients has a security expert who took a close look at
 how Zope authenticates users. The results were not good.
 
 The main problem is that Zope stores the username and password in a
 cookie in clear text (base64 encoded).

No, zope does not do that. There are userfolders and extensions
(like cookie crumbler) which do that. You can have any mechanism
you want.

 Even though it only happens in their internal network, my client wasn't
 too happy, because it makes them vulnerable to a man-in-the-middle attack.

So does it? With ssl layer?

 I know, the odds of that happening are low, but storing the username and
 password in clear text is clearly not best practice.

Sure you have to take care - but enabling some kind of digest auth
(below) isnt that hard - otoh, your password will be transfered
over the net in clear text in many cases - if you have a form
based login you will for sure transfer clear text username and
password. You could try javascript tricks to put digest like
authentication in a form based login, but thats not so easy and
bullet proof. And if you stress it too much you have great
security - but no users :-)
So if you are security concerned, just put an ssl-layer on
top of zope. Usually via apache mod_ssl, mod_proxy and mod_rewrite.
You can also use pound or squid.

 So, my question is: is there a way to secure Zope authentication?
 
 I did find Dieter Mauer's DigestAuth product:
 http://www.dieter.handshake.de/pyprojects/zope/#DigestAuth

Digest out - so your users browser support it, is a solution
and better then basic-auth. However you dont have a nice
login form and you cant logout.

 It looks good. I have used other produts from Dieter before and was very
 pleased with the quality of his code.
 
 Now, have other people used it? Does it work with WebDAV? How secure is
 it (I am no security/encryption expert)?

WebDAV is just HTTP, so all you apply to it holds true for WebDAV
as well - beside the fact you cant have login forms. So basic auth
or digest auth can be used and can be secured via ssl.

 Also, if it is good, why is not part of default Zope??

Cookie auth isnt part of default zope either.

 Finally, a little side story: you know how in Windows XP, you can
 connect a drive to a WebDAV server? Well, if you install Service Pack 2,
 you can't use that feature to connect to Zope anymore. Interestingly
 enough, it seems that it is precisely because of that authentication
 vlunerability: Win XP SP2 refuses to connect to a WebDAV that doesn't at
 least encode the username/password in Digest authentication...
 
Yes, MS never gets it right with official standards. You can patch
around to make it work with the windows of the day, but you might
need to change it next time again. However you can use 3rd party
products like WebDrive/TeamDrive which have been reported to work
flawlessy since the early days of zopes webdav support.

Kind regards
Tino

___
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] Question about Zope and security

2006-03-29 Thread Lennart Regebro
On 3/30/06, Cyrille Bonnet [EMAIL PROTECTED] wrote:
 The main problem is that Zope stores the username and password in a
 cookie in clear text (base64 encoded).

As mentioned before, Zope doesn't, but CookieCrumbler (and hence Plone) does.
And, the security expert is not much of a security expert at all, if
he doesn't know this:

You will only get real web security with SSL.

 Even though it only happens in their internal network, my client wasn't
 too happy, because it makes them vulnerable to a man-in-the-middle attack.

All plain http is vulnerable to that, which is why If you care about
security, you need to use https.

 So, my question is: is there a way to secure Zope authentication?

Yup. See above. :)

 Also, if it is good, why is not part of default Zope??

Good question. :-)

However, today you want to use PAS. The new fancy modular user folder
for Zope. I don't know if it works with Plone yet, though.

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


[Zope] question: upload files to folder AND database

2006-03-08 Thread Olivier Wambacq
hello,

is it possible to upload files in plone, using a form (like the form in
plonelocalfolderNG) AND sending a url to that file + additional information
to a database using popy connection?

I can upload files using plonelocalfolderNG, but I can't send any more info
with it. + I need to sort them, so I need some more info (like category,
author, ...) in a database to perform my sql on.

also, I want to let users upload using a form, not with the add tab button.

I tried watching the plonelocalfolderNG code, and making my own, but I can't
get it to work.

thanx in advance,
Olivier

___
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] question: upload files to folder AND database

2006-03-08 Thread Andrew Milton
+---[ Olivier Wambacq ]--
| hello,
| 
| is it possible to upload files in plone, using a form (like the form in
| plonelocalfolderNG) AND sending a url to that file + additional information
| to a database using popy connection?
| 
| I can upload files using plonelocalfolderNG, but I can't send any more info
| with it. + I need to sort them, so I need some more info (like category,
| author, ...) in a database to perform my sql on.
| 
| also, I want to let users upload using a form, not with the add tab button.
| 
| I tried watching the plonelocalfolderNG code, and making my own, but I can't
| get it to work.


Post to a python script that first sends it to your db storage script, 
and then on to plonelocalfolderNG

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


Re: [Zope] question for anyone using apache on windows

2005-12-22 Thread michael nt milne
ok will do. Just that alot of people have apache experience on this list and I've got some really good help from it.On 12/21/05, Chris Withers 
[EMAIL PROTECTED] wrote:I'm sure there's an Apache list you could be asking these questions,
this has nothing to do with Zope.#apache on irc.freenode.net is where I'd go ;-)Chrismichael nt milne wrote: Hi Ok so I looked at this stuff but can't find anything listed for point 3.
 Also I had to set Plone to listen on 8080 within its config file and now get Apache for my Plone domains. However they won't re-direct to the right site within the Plone installation. I've achieved this on Unix with the virtual
 host stuff below.1. Find the httpd.conf file (usually you will find it in a foldercalled conf, config or something along those lines)2. Inside the httpd.conf file uncomment the line *LoadModule
rewrite_module modules/mod_rewrite.so* (remove the pound '#' sign fromin front of the line)3. Also find the line *ClearModuleList* is uncommented then find andmake sure that the line *AddModule mod_rewrite.c* is not commented
out.NameVirtualHost ip:80VirtualHost ip:80ServerName nameRewriteEngine OnRewriteRule ^/(.*)
http://ip:8080/VirtualHostBase/http/name:80/site/VirtualHostRoot/$1 [L,P]/VirtualHost On 12/19/05, michael nt milne 
[EMAIL PROTECTED] wrote:ok, i simply downloaded the Apache 2.0.55 release for Windoes from Apache.Thre RewriteEngine is set to on in the httpd.conf. God knows why themodule wouldn't be available in the distribution. Do you know any
documentation on how to install on module at all? The unix version comeswith it by default I think. **On 12/19/05, Andreas Jung [EMAIL PROTECTED]
 wrote:Likely the rewrite module isn't loaded (check the correspondingLoadModulestatements of your configuration).-aj
--On 19. Dezember 2005 16:33:59 + michael nt milne [EMAIL PROTECTED] wrote:Does RewriteEngine work on Apache for Windows 
2.0.5 ?I'm getting the following..Syntax error on line 960 of C:/Program Files/ApacheGroup/Apache2/conf/httpd.con
f:Invalid command 'RewriteEngine', perhaps mis-spelled or defined by amodule notincluded in the server configurationNote the errors or messages above, and press the ESC key to
exit.22...NameVirtualHost ip:80VirtualHost ip:80ServerName name
RewriteEngine OnRewriteRule ^/(.*)http://ip:8080/VirtualHostBase/http/name:80/site/VirtualHostRoot/$1 [L,P]
/VirtualHost 
 ___ 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 )--Simplistix - Content Management, Zope  Python Consulting- http://www.simplistix.co.uk

___
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] question for anyone using apache on windows

2005-12-21 Thread Chris Withers
I'm sure there's an Apache list you could be asking these questions, 
this has nothing to do with Zope.


#apache on irc.freenode.net is where I'd go ;-)

Chris

michael nt milne wrote:

Hi

Ok so I looked at this stuff but can't find anything listed for point 3.
Also I had to set Plone to listen on 8080 within its config file and now get
Apache for my Plone domains. However they won't re-direct to the right site
within the Plone installation. I've achieved this on Unix with the virtual
host stuff below.


   1. Find the httpd.conf file (usually you will find it in a folder
   called conf, config or something along those lines)
   2. Inside the httpd.conf file uncomment the line *LoadModule
   rewrite_module modules/mod_rewrite.so* (remove the pound '#' sign from
   in front of the line)
   3. Also find the line *ClearModuleList* is uncommented then find and
   make sure that the line *AddModule mod_rewrite.c* is not commented
   out.



NameVirtualHost ip:80
VirtualHost ip:80
ServerName name
RewriteEngine On
RewriteRule ^/(.*)
http://ip:8080/VirtualHostBase/http/name:80/site/Virt
ualHostRoot/$1 [L,P]
/VirtualHost




On 12/19/05, michael nt milne [EMAIL PROTECTED] wrote:


ok, i simply downloaded the Apache 2.0.55 release for Windoes from Apache.
Thre RewriteEngine is set to on in the httpd.conf. God knows why the
module wouldn't be available in the distribution. Do you know any
documentation on how to install on module at all? The unix version comes
with it by default I think. **

On 12/19/05, Andreas Jung [EMAIL PROTECTED] wrote:


Likely the rewrite module isn't loaded (check the corresponding
LoadModule
statements of your configuration).

-aj

--On 19. Dezember 2005 16:33:59 + michael nt milne
 [EMAIL PROTECTED] wrote:



Does RewriteEngine work on Apache for Windows 2.0.5 ?

I'm getting the following..

Syntax error on line 960 of C:/Program Files/Apache
Group/Apache2/conf/httpd.con
f:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a
module not
included in the server configuration
Note the errors or messages above, and press the ESC key to


exit.  22...




NameVirtualHost ip:80
VirtualHost ip:80
ServerName name
RewriteEngine On
RewriteRule ^/(.*)
http://ip:8080/VirtualHostBase/http/name:80/site/Virt
ualHostRoot/$1 [L,P]
/VirtualHost












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


--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] question for anyone using apache on windows

2005-12-19 Thread Jens Vagelpohl


On 19 Dec 2005, at 16:33, michael nt milne wrote:


Does RewriteEngine work on Apache for Windows 2.0.5 ?

I'm getting the following..

Syntax error on line 960 of C:/Program Files/Apache Group/Apache2/ 
conf/httpd.con

f:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by  
a module not

included in the server configuration
Note the errors or messages above, and press the ESC key to  
exit.  22...


Of course it does. I would assume you don't have it (mod_rewrite)  
configured for loading or it's simply not in your installation.


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 )


Re: [Zope] question for anyone using apache on windows

2005-12-19 Thread Andreas Jung

Likely the rewrite module isn't loaded (check the corresponding LoadModule
statements of your configuration).

-aj

--On 19. Dezember 2005 16:33:59 + michael nt milne 
[EMAIL PROTECTED] wrote:



Does RewriteEngine work on Apache for Windows 2.0.5 ?

I'm getting the following..

Syntax error on line 960 of C:/Program Files/Apache
Group/Apache2/conf/httpd.con
f:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a
module not
included in the server configuration
Note the errors or messages above, and press the ESC key to exit.  22...



NameVirtualHost ip:80
VirtualHost ip:80
ServerName name
RewriteEngine On
RewriteRule ^/(.*)
http://ip:8080/VirtualHostBase/http/name:80/site/Virt
ualHostRoot/$1 [L,P]
/VirtualHost






pgpa7v5VYOU9t.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] question for anyone using apache on windows

2005-12-19 Thread michael nt milne
ok, i simply downloaded the Apache 2.0.55 release for Windoes from Apache. Thre RewriteEngine is set to on in the httpd.conf. God knows why the module wouldn't be available in the distribution. Do you know any documentation on how to install on module at all? The unix version comes with it by default I think.

On 12/19/05, Andreas Jung [EMAIL PROTECTED] wrote:
Likely the rewrite module isn't loaded (check the corresponding LoadModulestatements of your configuration).-aj--On 19. Dezember 2005 16:33:59 + michael nt milne
[EMAIL PROTECTED] wrote: Does RewriteEngine work on Apache for Windows 2.0.5 ? I'm getting the following.. Syntax error on line 960 of C:/Program Files/Apache
 Group/Apache2/conf/httpd.con f: Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration Note the errors or messages above, and press the ESC key to exit.22...
 NameVirtualHost ip:80 VirtualHost ip:80 ServerName name RewriteEngine On RewriteRule ^/(.*) 
http://ip:8080/VirtualHostBase/http/name:80/site/Virt ualHostRoot/$1 [L,P] /VirtualHost
___
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] question for anyone using apache on windows

2005-12-19 Thread michael nt milne
HiOk so I looked at this stuff but can't find anything listed for point 3. Also I had to set Plone to listen on 8080 within its config file and now get Apache for my Plone domains. However they won't re-direct to the right site within the Plone installation. I've achieved this on Unix with the virtual host stuff below.
Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so
 (remove the pound '#' sign from in front of the line)Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.
 NameVirtualHost ip:80 VirtualHost ip:80 ServerName name RewriteEngine On RewriteRule ^/(.*) 

http://ip:8080/VirtualHostBase/http/name:80/site/Virt ualHostRoot/$1 [L,P] /VirtualHostOn 12/19/05, michael nt milne
 [EMAIL PROTECTED] wrote:
ok, i simply downloaded the Apache 2.0.55 release for Windoes from Apache. Thre RewriteEngine is set to on in the httpd.conf. God knows why the module wouldn't be available in the distribution. Do you know any documentation on how to install on module at all? The unix version comes with it by default I think.


On 12/19/05, Andreas Jung [EMAIL PROTECTED]
 wrote:
Likely the rewrite module isn't loaded (check the corresponding LoadModulestatements of your configuration).-aj--On 19. Dezember 2005 16:33:59 + michael nt milne

[EMAIL PROTECTED] wrote: Does RewriteEngine work on Apache for Windows 2.0.5 ? I'm getting the following.. Syntax error on line 960 of C:/Program Files/Apache

 Group/Apache2/conf/httpd.con f: Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration Note the errors or messages above, and press the ESC key to exit.22...
 NameVirtualHost ip:80 VirtualHost ip:80 ServerName name RewriteEngine On RewriteRule ^/(.*) 

http://ip:8080/VirtualHostBase/http/name:80/site/Virt ualHostRoot/$1 [L,P] /VirtualHost


___
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] Question about Stepper

2005-11-30 Thread Chris Withers

Jens Vagelpohl wrote:


Pardon my stupidity but is Chris Withers' Stepper the right thing  for 
me...?


yes


What he said ;-)


The call to sendAllUnsent() I would prefer if it was done
asyncronously in case it takes several seconds. I could accomplish
this by having a cron job calling it every 5 minutes but ldeally I
don't want to rely on cron for this setup. Is Stepper the right thing
for me?


Stepper still needs cron. It is not a cron replacement.


...but it does make building a cron job that does stuff with Zope a 
whole lot easier, and covers all the edge cases you'd forget ;-)


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Question about Stepper

2005-11-29 Thread Peter Bengtsson
Pardon my stupidity but is Chris Withers' Stepper the right thing for me...?

I've got a message central that accepts and sends messages. The system
has an in-part and and out-part that is quite separate. Then there's
third party code that looks a bit like this:

pseudocode
def acceptIncomingMessage(self, message):
# add to the queue
self.getMCentral().storeMessage(message)
# process all (should be only one) items off the queue
self.getMCentral().sendAllUnsent()
return cool
/pseudocode

The call to sendAllUnsent() I would prefer if it was done
asyncronously in case it takes several seconds. I could accomplish
this by having a cron job calling it every 5 minutes but ldeally I
don't want to rely on cron for this setup. Is Stepper the right thing
for me?


--
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] Question about Stepper

2005-11-29 Thread Jens Vagelpohl


On 29 Nov 2005, at 11:12, Peter Bengtsson wrote:

Pardon my stupidity but is Chris Withers' Stepper the right thing  
for me...?


yes



The call to sendAllUnsent() I would prefer if it was done
asyncronously in case it takes several seconds. I could accomplish
this by having a cron job calling it every 5 minutes but ldeally I
don't want to rely on cron for this setup. Is Stepper the right thing
for me?


Stepper still needs cron. It is not a cron replacement.

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 )


Re: [Zope] question about Zope capabilities

2005-11-17 Thread Paul Winkler
On Wed, Nov 16, 2005 at 10:56:34PM -0600, Terry Hancock wrote:
 On Wed, 16 Nov 2005 16:49:47 -0800
 Rich Robinson [EMAIL PROTECTED] wrote:
  At this point, the site is great for managing content via
  the  database.  However, as far as I can see pretty much
  all the content  needs to fit into templates, with the
  result that there appears to be  little room for setting
  up a more free-form looking page that can  incorporate
  graphics in a freer, more visual way. 
 
 Well, *ANY* system that generates a web page is going to
 have that problem.  Yes, you *CAN* make it more free form,
 but freedom carries responsibility

Yep. A quick-and-dirty solution would be to have some pages that are
just Files with content type text/html.  But then of course they're just
static html and you are 100% responsible for the content of those pages.
So you'd have to balance the maintenance cost against the work of
creating a smarter solution.

-- 

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] question about Zope capabilities

2005-11-17 Thread Jonathan


- Original Message - 
From: Paul Winkler [EMAIL PROTECTED]

To: zope@zope.org
Sent: Thursday, November 17, 2005 9:25 AM
Subject: Re: [Zope] question about Zope capabilities



On Wed, Nov 16, 2005 at 10:56:34PM -0600, Terry Hancock wrote:

On Wed, 16 Nov 2005 16:49:47 -0800
Rich Robinson [EMAIL PROTECTED] wrote:
 At this point, the site is great for managing content via
 the  database.  However, as far as I can see pretty much
 all the content  needs to fit into templates, with the
 result that there appears to be  little room for setting
 up a more free-form looking page that can  incorporate
 graphics in a freer, more visual way.

Well, *ANY* system that generates a web page is going to
have that problem.  Yes, you *CAN* make it more free form,
but freedom carries responsibility


Yep. A quick-and-dirty solution would be to have some pages that are
just Files with content type text/html.  But then of course they're just
static html and you are 100% responsible for the content of those pages.
So you'd have to balance the maintenance cost against the work of
creating a smarter solution.



A less quick and less dirty solution could be to create several templates 
(each with different layouts) and serve them up at random.



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 )


[Zope] question about Zope capabilities

2005-11-16 Thread Rich Robinson

Hi,

I'm brand new on this list and writing to get a bit of insight here. 
We had someone design a web site using Zope, and very pleased with 
it.  That person is no longer with us and I'm not at all a savvy 
back-end person, let alone Zope-savvy.


At this point, the site is great for managing content via the 
database.  However, as far as I can see pretty much all the content 
needs to fit into templates, with the result that there appears to be 
little room for setting up a more free-form looking page that can 
incorporate graphics in a freer, more visual way.  Sure, we can add 
images and any HTML we like, but they are confined to the areas 
designated by the templates.  In other words, the site tends to look 
like a database-driven website - not unpleasing by any means, but 
I'm wondering if Zope lends itself to more creative looking pages 
that departs from the templated look.


At zope.org there is a list of sites using Zope that I'll have a look 
at, but I'd be appreciative of any feedback.  We are thinking of 
hiring someone with more graphics than back-end experience and I'd 
like to hear if anyone thinks Zope is adaptable to give someone 
plenty of creative expression.


Thanks!

Rich
___
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] question about Zope capabilities

2005-11-16 Thread Terry Hancock
On Wed, 16 Nov 2005 16:49:47 -0800
Rich Robinson [EMAIL PROTECTED] wrote:
 At this point, the site is great for managing content via
 the  database.  However, as far as I can see pretty much
 all the content  needs to fit into templates, with the
 result that there appears to be  little room for setting
 up a more free-form looking page that can  incorporate
 graphics in a freer, more visual way. 

Well, *ANY* system that generates a web page is going to
have that problem.  Yes, you *CAN* make it more free form,
but freedom carries responsibility -- the code will be much
more complicated.  And of course, Humans are smart. Your
readers will eventually figure out the trick no matter how
smart your code is (that is, they will be able to predict
its behavior, thus find it unsurprising, hence dull
compared to pages designed by Humans).

That's just life, really.  Hand crafted is recognizeable,
and machine generated is never going to be it.

 Sure, we can add 
 images and any HTML we like, but they are confined to the
 areas  designated by the templates.  In other words, the
 site tends to look  like a database-driven website - not
 unpleasing by any means, but  I'm wondering if Zope lends
 itself to more creative looking pages  that departs from
 the templated look.

*However*, the layout of the page can itself be database
driven (whether we are talking about an external RDBMS or
the ZODB within Zope).  It is entirely possible to design a
page in which the structure itself varies according to the
content. But, as I said above, this is more complicated.

I have pulled background images from a randomly-ordered
list, based on the date or time of viewing (this is much
more scalable than picking randomly on each pull, because it
means that ALL people viewing the page at the same time will
need the SAME image, so it can be cached).

I have written markup structured to build words out of
images, based on the content of the words (an alternative to
using special fonts, which is a bit more wasteful of
bandwidth, but allows *any* kind of font).

I have written Zope table-layouts that cascaded in a zigzag
pattern down the page, distributing the content in an
apparently out of square layout (actually it really is in
squares, but they partially overlap).

I wrote a table layout generator that makes clock patterns
with 12 table cels arranged in a circle.

And of course, you can always intersperse hand crafted
pages with data-driven content pages, or combine both on
the same page.

-- 
Terry Hancock ([EMAIL PROTECTED])
Anansi Spaceworks http://www.AnansiSpaceworks.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] question about stopping acquisition in VHM sites?

2005-10-28 Thread Chris Withers

Gary wrote:

I don't know how the URL got out. But the web-bots are having so much fun
with my website right now. :( They are indexing everything for the wrong
virtual host. Maybe robot.txt will stop them.


Ah yes, a rewrite rule in your front end server should fix this, 
robots.txt _should_ help but likely won't ;-)


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] question about stopping acquisition in VHM sites?

2005-10-27 Thread Chris Withers

Gary wrote:

How do I stop acquisition at the root of my website?
If I have two websites in zope, and I set the virtual host mapping to
www.sitea.com/websites/SiteA http://www.sitea.com/websites/SiteA
www.siteb.com/websites/SiteB http://www.siteb.com/websites/SiteB

I don't want my users to get to SiteB from http://www.sitea.com/SiteB


Why not? How would they find a URL like that?

You can't do anything from the Zope side to stop this.
An Apache rewrite rule maybe? You'll need ot be clever mind...

http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc

...will still work.

Best bet? Don't sweat it, onyl worry about it if it really proves to be 
a problem ,which it shouldn't be...


cheers,

Chris

PS: There's always Zope 3 ;-)

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] question about stopping acquisition in VHM sites?

2005-10-27 Thread Gary
On 10/27/05, Chris Withers [EMAIL PROTECTED] wrote:
Gary wrote: How do I stop acquisition at the root of my website? If I have two websites in zope, and I set the virtual host mapping to www.sitea.com/websites/SiteA
 http://www.sitea.com/websites/SiteA www.siteb.com/websites/SiteB 
http://www.siteb.com/websites/SiteB I don't want my users to get to SiteB from http://www.sitea.com/SiteBWhy not? How would they find a URL like that?
You can't do anything from the Zope side to stop this.An Apache rewrite rule maybe? You'll need ot be clever mind...http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc
...will still work.Best bet? Don't sweat it, onyl worry about it if it really proves to bea problem ,which it shouldn't be...cheers,ChrisPS: There's always Zope 3 ;-)

Thanks Chris,

I don't know how the URL got out. But the web-bots are having so
much fun with my website right now. :(
They are indexing everything for the wrong virtual host. Maybe
robot.txt will stop them.

--
Gary
___
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] question about stopping acquisition in VHM sites?

2005-10-27 Thread David H




Gary wrote:
On 10/27/05, Chris Withers
[EMAIL PROTECTED]
wrote:
  
  Gary
wrote:
 How do I stop acquisition at the root of my website?
 If I have two websites in zope, and I set the virtual host mapping
to
 www.sitea.com/websites/SiteA
 http://www.sitea.com/websites/SiteA
 www.siteb.com/websites/SiteB

http://www.siteb.com/websites/SiteB

 I don't want my users to get to SiteB from http://www.sitea.com/SiteB

Why not? How would they find a URL like that?


You can't do anything from the Zope side to stop this.
An Apache rewrite rule maybe? You'll need ot be clever mind...

http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc


...will still work.

Best bet? Don't sweat it, onyl worry about it if it really proves to be
a problem ,which it shouldn't be...

cheers,

Chris

PS: There's always Zope 3 ;-)

  
  
  
Thanks Chris,
  
I don't know how the URL got out. But the web-bots are having so
much fun with my website right now. :(
They are indexing everything for the wrong virtual host. Maybe
robot.txt will stop them.
  
--
Gary
  


Gary,
Are these anonymous access sites? If not then where are your users
defined? BTW, im curious - how does Zope 3 otherwise solve this?
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 )


Re: [Zope] question about stopping acquisition in VHM sites?

2005-10-27 Thread Gary
On 10/27/05, David H [EMAIL PROTECTED] wrote:



  
  


Gary wrote:
On 10/27/05, Chris Withers
[EMAIL PROTECTED]
wrote:
  
  Gary
wrote:
 How do I stop acquisition at the root of my website?
 If I have two websites in zope, and I set the virtual host mapping
to
 www.sitea.com/websites/SiteA
 http://www.sitea.com/websites/SiteA
 www.siteb.com/websites/SiteB

http://www.siteb.com/websites/SiteB

 I don't want my users to get to SiteB from http://www.sitea.com/SiteB

Why not? How would they find a URL like that?


You can't do anything from the Zope side to stop this.
An Apache rewrite rule maybe? You'll need ot be clever mind...

http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc


...will still work.

Best bet? Don't sweat it, onyl worry about it if it really proves to be
a problem ,which it shouldn't be...

cheers,

Chris

PS: There's always Zope 3 ;-)

  
  
  
Thanks Chris,
  
I don't know how the URL got out. But the web-bots are having so
much fun with my website right now. :(
They are indexing everything for the wrong virtual host. Maybe
robot.txt will stop them.
  
--
Gary
  

Gary,
Are these anonymous access sites? If not then where are your users
defined? BTW, im curious - how does Zope 3 otherwise solve this?
David

Yes David, it's anonymous access. 
--
Gary

___
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] question about stopping acquisition in VHM sites?

2005-10-27 Thread J Cameron Cooper

Gary wrote:


Hi,

How do I stop acquisition at the root of my website?
If I have two websites in zope, and I set the virtual host mapping to
www.sitea.com/websites/SiteA http://www.sitea.com/websites/SiteA
www.siteb.com/websites/SiteB http://www.siteb.com/websites/SiteB

I don't want my users to get to SiteB from http://www.sitea.com/SiteB

I am using Zope 2.7 


You can create in each site an empty Python script or something named 
like the other site(s). This is not the best solution in the world, 
since if you have more than a handful of sites, you get a combinatorial 
explosion. But, it will work.


Perhaps someone who is bothered by this problem and has time will do 
some magic in VHM (or a new type of object) to stop such traversals.


   --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] question about stopping acquisition in VHM sites?

2005-10-26 Thread Gary
Hi,



How do I stop acquisition at the root of my website?

If I have two websites in zope, and I set the virtual host mapping to

www.sitea.com/websites/SiteA

www.siteb.com/websites/SiteB



I don't want my users to get to SiteB from http://www.sitea.com/SiteB



I am using Zope 2.7



Thanks,



Gary

___
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] question about stopping acquisition in VHM sites?

2005-10-26 Thread Gary
Hi,





How do I stop acquisition at the root of my website?


If I have two websites in zope, and I set the virtual host mapping to


www.sitea.com/websites/SiteA


www.siteb.com/websites/SiteB





I don't want my users to get to SiteB from http://www.sitea.com/SiteB





I am using Zope 2.7





Thanks,




Gary



___
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] Question: What Workflow tool to choose?

2005-10-24 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
 
 
 --On 21. Oktober 2005 12:18:31 -0400 Robert Boyd
 [EMAIL PROTECTED] wrote:
 
 I've been tasked with rapidly developing a demo for a proposed workflow
 application using Zope. I have plenty of CMF experience including
 customized workflows based on DCWorkflow, but I'm wondering what other
 workflows are actively supported and of production quality. In the past
 I've read blurbs about OpenFlow, ReFlow, and a Google search today turned
 up those and Metaflow and some others. However, many of them are
 dead-ends.
 
 
 The only reasonable workflow systems are DCWorkflow and Alphaflow
 (requires Plone). Everything else is more or less old and unmaintained
 or at least not very much usable.
 

Well, ...

CPSWorkflow that requires CPS. It provides a lot of extensions to
DCWorkflow.

Check out some documentations over there :

http://www.cps-project.org/sections/documentation/developers/cpsworkflow/switchLanguage/en/
http://www.cps-project.org/sections/documentation/developers/cps_workflow/downloadFile/attachedFile/cps_wf_impl_procedure.html?nocache=1121817595.66

J.

- --
Julien Anguenot | Nuxeo RD (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDXNNCGhoG8MxZ/pIRAiOHAJ9qNmyTLvBnCqCcY868MLyyYNtZ4wCeOJwG
pSI7NO0Zybp7ys10+KSMgtA=
=IWQ1
-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 )


[Zope] Question: What Workflow tool to choose?

2005-10-21 Thread Robert Boyd
I've been tasked with rapidly developing a demo for a proposed workflow
application using Zope. I have plenty of CMF experience including
customized workflows based on DCWorkflow, but I'm wondering what other
workflows are actively supported and of production quality. In the past
I've read blurbs about OpenFlow, ReFlow, and a Google search today
turned up those and Metaflow and some others. However, many of them are
dead-ends.

Openflow's site is a 404 Not Found (in Italian)
Metaflow: a 2002 article on ZopeMag sounded interesting, but no link to
the software and I can't find it. Plus, old posts on this list make it
sound problematic.
Reflow turned into CMFOpenflow, which was a fork of Openflow?
JaWE2Openflow sounded interesting, but the links are 404 Not Found.

Is CMF(DC)Workflow my best option? My application would most likely
*not* need other CMF tools, I might want it as a straight Zope 2
application. Also, I'm very new to Zope 3, does it include any workflow
or have any available?

Thanks,
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] Question: What Workflow tool to choose?

2005-10-21 Thread Andreas Jung



--On 21. Oktober 2005 12:18:31 -0400 Robert Boyd [EMAIL PROTECTED] 
wrote:



I've been tasked with rapidly developing a demo for a proposed workflow
application using Zope. I have plenty of CMF experience including
customized workflows based on DCWorkflow, but I'm wondering what other
workflows are actively supported and of production quality. In the past
I've read blurbs about OpenFlow, ReFlow, and a Google search today turned
up those and Metaflow and some others. However, many of them are
dead-ends.


The only reasonable workflow systems are DCWorkflow and Alphaflow (requires 
Plone). Everything else is more or less old and unmaintained or at least 
not very much usable.


-aj


pgpO0PXUDdugf.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 )


[Zope] Question about zserver-threads.

2005-07-29 Thread Pascal Peregrina
Hi,
 
Concerning the zserver-threads config param...
If I have an http-server, ftp-server and webdqv-source-server and if my
global zserver-threads param is set to 10, does it mean :
a)The the max number of http-server + ftp-server + webdav-source-server
threads will be 10 ?
b)The max number of http-server + ftp-server + webdav-source-server threads
will be 30 (3 zservers) ?
 
Thanks
 
Pascal


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] Question about zserver-threads.

2005-07-29 Thread Jens Vagelpohl


On 29 Jul 2005, at 10:43, Pascal Peregrina wrote:
If I have an http-server, ftp-server and webdqv-source-server and  
if my

global zserver-threads param is set to 10, does it mean :
a)The the max number of http-server + ftp-server + webdav-source- 
server

threads will be 10 ?
b)The max number of http-server + ftp-server + webdav-source-server  
threads

will be 30 (3 zservers) ?


a

By the way, these parameters should not be tweaked without fully  
understanding the implications. This is not some magic go fast button.


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] question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki
I use the following template often. When using a page template for my MAIN page, 
I access the error and message vars with:


p tal:content=options/errorError message/p
p tal:content=options/messageReg. Message/p

How would I access them when I use a dtml-method for my MAIN page?
dtml-var error and dtml-var message don't seem to work.

Python Script - index_html:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

error=''
message=''

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

elif  request.get('next_state') == 'Do Something':
  try:
doSomething()
message = message + 'We did something'
  except:
error = error + 'Error in doSomething()'


elif  request.get('next_state') == 'Do Something Else':
  try:
doSomethingElse()
message = message + 'We did something else'
  except:
error = error + 'Error in doSomethingElse()'


return container['MAIN'](context, request, error=error, message=message)

___
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] question on python script, dtml method and options

2005-07-19 Thread Peter Bengtsson
On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:
 I use the following template often. When using a page template for my MAIN 
 page,
 I access the error and message vars with:
 
 p tal:content=options/errorError message/p
 p tal:content=options/messageReg. Message/p
 
 How would I access them when I use a dtml-method for my MAIN page?
 dtml-var error and dtml-var message don't seem to work.
 

That _should_ work. 
In DTML, I think when you ask for something it does a options,
REQUEST, context, acquisition context lookup all in one loop. In TAL
you can't be lazy :( and you have to specify exactly where you expect
it to come from.

Bare in mind that keyword arguments only span across ONE template
where as variables in REQUEST span across ALL templates.

Doublecheck your template usage and/or send us your traceback.

 Python Script - index_html:
 
 # Import a standard function, and get the HTML request and response objects.
 from Products.PythonScripts.standard import html_quote
 request = container.REQUEST
 RESPONSE =  request.RESPONSE
 
 error=''
 message=''
 
 if not request.has_key('next_state'):
return container['MAIN'](context, request, error=error, message=message)
 
 elif  request.get('next_state') == 'Do Something':
try:
  doSomething()
  message = message + 'We did something'
except:
  error = error + 'Error in doSomething()'
 
 
 elif  request.get('next_state') == 'Do Something Else':
try:
  doSomethingElse()
  message = message + 'We did something else'
except:
  error = error + 'Error in doSomethingElse()'
 
 
 return container['MAIN'](context, request, error=error, message=message)
 
 ___
 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] question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki
I don't get a traceback, i just get error and message back as empty strings; 
their initiallized value.


very strange.



Peter Bengtsson wrote:

On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:


I use the following template often. When using a page template for my MAIN page,
I access the error and message vars with:

p tal:content=options/errorError message/p
p tal:content=options/messageReg. Message/p

How would I access them when I use a dtml-method for my MAIN page?
dtml-var error and dtml-var message don't seem to work.




That _should_ work. 
In DTML, I think when you ask for something it does a options,

REQUEST, context, acquisition context lookup all in one loop. In TAL
you can't be lazy :( and you have to specify exactly where you expect
it to come from.

Bare in mind that keyword arguments only span across ONE template
where as variables in REQUEST span across ALL templates.

Doublecheck your template usage and/or send us your traceback.



Python Script - index_html:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

error=''
message=''

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

elif  request.get('next_state') == 'Do Something':
  try:
doSomething()
message = message + 'We did something'
  except:
error = error + 'Error in doSomething()'


elif  request.get('next_state') == 'Do Something Else':
  try:
doSomethingElse()
message = message + 'We did something else'
  except:
error = error + 'Error in doSomethingElse()'


return container['MAIN'](context, request, error=error, message=message)

___
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] question on python script, dtml method and options

2005-07-19 Thread Peter Bengtsson
On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:
 I don't get a traceback, i just get error and message back as empty strings;
 their initiallized value.
 

So you're not getting an error. 
What is the initialized value? Is 'error' and 'message' set in REQUEST?
(that you can find out from doing dtml-var REQUEST)


 
 
 Peter Bengtsson wrote:
  On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:
 
 I use the following template often. When using a page template for my MAIN 
 page,
 I access the error and message vars with:
 
 p tal:content=options/errorError message/p
 p tal:content=options/messageReg. Message/p
 
 How would I access them when I use a dtml-method for my MAIN page?
 dtml-var error and dtml-var message don't seem to work.
 
 
 
  That _should_ work.
  In DTML, I think when you ask for something it does a options,
  REQUEST, context, acquisition context lookup all in one loop. In TAL
  you can't be lazy :( and you have to specify exactly where you expect
  it to come from.
 
  Bare in mind that keyword arguments only span across ONE template
  where as variables in REQUEST span across ALL templates.
 
  Doublecheck your template usage and/or send us your traceback.
 
 
 Python Script - index_html:
 
 # Import a standard function, and get the HTML request and response objects.
 from Products.PythonScripts.standard import html_quote
 request = container.REQUEST
 RESPONSE =  request.RESPONSE
 
 error=''
 message=''
 
 if not request.has_key('next_state'):
return container['MAIN'](context, request, error=error, message=message)
 
 elif  request.get('next_state') == 'Do Something':
try:
  doSomething()
  message = message + 'We did something'
except:
  error = error + 'Error in doSomething()'
 
 
 elif  request.get('next_state') == 'Do Something Else':
try:
  doSomethingElse()
  message = message + 'We did something else'
except:
  error = error + 'Error in doSomethingElse()'
 
 
 return container['MAIN'](context, request, error=error, message=message)
 
 ___
 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] question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki

I am using DTML only because I am using the excellent Calendar tag product.

sometimes, the links on the calendar tag get affected by from variables so as a 
hack i re-write the QUERY_STRING using:


request.RESPONSE.redirect(request['URL'] + '?mode-calendar=' + 
request['mode-calendar'] + 'date-calendar=' + request['date-calendar'] + 
'location=' + request['location'])


instead of:

return container['MAIN'](context, request, error=error, message=message)

I originally left that detail out to avoid unnecessary confusion, but I think it 
might be the cause...ideas?






Peter Bengtsson wrote:

On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:


I use the following template often. When using a page template for my MAIN page,
I access the error and message vars with:

p tal:content=options/errorError message/p
p tal:content=options/messageReg. Message/p

How would I access them when I use a dtml-method for my MAIN page?
dtml-var error and dtml-var message don't seem to work.




That _should_ work. 
In DTML, I think when you ask for something it does a options,

REQUEST, context, acquisition context lookup all in one loop. In TAL
you can't be lazy :( and you have to specify exactly where you expect
it to come from.

Bare in mind that keyword arguments only span across ONE template
where as variables in REQUEST span across ALL templates.

Doublecheck your template usage and/or send us your traceback.



Python Script - index_html:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

error=''
message=''

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

elif  request.get('next_state') == 'Do Something':
  try:
doSomething()
message = message + 'We did something'
  except:
error = error + 'Error in doSomething()'


elif  request.get('next_state') == 'Do Something Else':
  try:
doSomethingElse()
message = message + 'We did something else'
  except:
error = error + 'Error in doSomethingElse()'


return container['MAIN'](context, request, error=error, message=message)

___
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] question on python script, dtml method and options

2005-07-19 Thread Peter Bengtsson
How you get to the page is irrelevant. I don't care if you redirect
there or type in the url or click a link.

On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:
 I am using DTML only because I am using the excellent Calendar tag product.
 
 sometimes, the links on the calendar tag get affected by from variables so as 
 a
 hack i re-write the QUERY_STRING using:
 
 request.RESPONSE.redirect(request['URL'] + '?mode-calendar=' +
 request['mode-calendar'] + 'date-calendar=' + request['date-calendar'] +
 'location=' + request['location'])
 
 instead of:
 
 return container['MAIN'](context, request, error=error, message=message)
 
 I originally left that detail out to avoid unnecessary confusion, but I think 
 it
 might be the cause...ideas?
 
 
 
 
 
 Peter Bengtsson wrote:
  On 7/19/05, Erik Myllymaki [EMAIL PROTECTED] wrote:
 
 I use the following template often. When using a page template for my MAIN 
 page,
 I access the error and message vars with:
 
 p tal:content=options/errorError message/p
 p tal:content=options/messageReg. Message/p
 
 How would I access them when I use a dtml-method for my MAIN page?
 dtml-var error and dtml-var message don't seem to work.
 
 
 
  That _should_ work.
  In DTML, I think when you ask for something it does a options,
  REQUEST, context, acquisition context lookup all in one loop. In TAL
  you can't be lazy :( and you have to specify exactly where you expect
  it to come from.
 
  Bare in mind that keyword arguments only span across ONE template
  where as variables in REQUEST span across ALL templates.
 
  Doublecheck your template usage and/or send us your traceback.
 
 
 Python Script - index_html:
 
 # Import a standard function, and get the HTML request and response objects.
 from Products.PythonScripts.standard import html_quote
 request = container.REQUEST
 RESPONSE =  request.RESPONSE
 
 error=''
 message=''
 
 if not request.has_key('next_state'):
return container['MAIN'](context, request, error=error, message=message)
 
 elif  request.get('next_state') == 'Do Something':
try:
  doSomething()
  message = message + 'We did something'
except:
  error = error + 'Error in doSomething()'
 
 
 elif  request.get('next_state') == 'Do Something Else':
try:
  doSomethingElse()
  message = message + 'We did something else'
except:
  error = error + 'Error in doSomethingElse()'
 
 
 return container['MAIN'](context, request, error=error, message=message)
 
 ___
 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] question about login

2005-05-12 Thread Chris Withers
Phillip Hutchings wrote:
On 03/05/05, Dennis Allison [EMAIL PROTECTED] wrote:
Another option is to look at the other User Folder products which
do things differently.  Alternatively, you could modify the
CookieCrumbler product to make it fit your model.
I've used exUserFolder before, it can store info in the session rather
than chucking the user's password around ;)
I also posted some patches for CookieCrumbler a while back that do the 
same thing...

Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] question about login

2005-05-12 Thread Phillip Hutchings
On 13/05/05, Chris Withers [EMAIL PROTECTED] wrote:
 Phillip Hutchings wrote:
  On 03/05/05, Dennis Allison [EMAIL PROTECTED] wrote:
 
 Another option is to look at the other User Folder products which
 do things differently.  Alternatively, you could modify the
 CookieCrumbler product to make it fit your model.
 
  I've used exUserFolder before, it can store info in the session rather
  than chucking the user's password around ;)
 
 I also posted some patches for CookieCrumbler a while back that do the
 same thing...

Hm, time to search the archives, I'm sure it'll be useful.

-- 
Phillip Hutchings
http://www.sitharus.com/
[EMAIL PROTECTED] / [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] question about login

2005-05-02 Thread u1207440
I have created a login form an a few users in acl_users, both exists in a 
ordered folder called conference. My login Form post to a login dtml method and 
login dtml method redirect me to another page. Even though the user exists and 
username and password is correct, somehow zope won't redirect me. The login 
query window pops out three time and in the end it denied me You are not 
allowed to access '' in this context. Can someone help me, is there any 
thing I have to set?? should I move all the files into the root??
___
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] question about login

2005-05-02 Thread Phillip Hutchings
On 03/05/05, u1207440 [EMAIL PROTECTED] wrote:
 I have created a login form an a few users in acl_users, both exists in a 
 ordered folder 
 called conference. My login Form post to a login dtml method and login dtml 
 method 
 redirect me to another page. Even though the user exists and username and 
 password is 
 correct, somehow zope won't redirect me. The login query window pops out 
 three time and 
 in the end it denied me You are not allowed to access '' in this 
 context. Can someone 
 help me, is there any thing I have to set?? should I move all the files into 
 the root??

It sounds like you're calling a method that's either restricted or set
to a non-anonymous access level.

What product are you using to allow you to use forms to log in?

Can you post the DTML code?

-- 
Phillip Hutchings
http://www.sitharus.com/
[EMAIL PROTECTED] / [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] question about login

2005-05-02 Thread Dennis Allison

You might take a look at the CookieCrumbler product.  It does pretty much 
what you seem to want  manages much of the hard stuff.



On Tue, 3 May 2005, Phillip Hutchings wrote:

 On 03/05/05, u1207440 [EMAIL PROTECTED] wrote:
  I have created a login form an a few users in acl_users, both exists in a 
  ordered folder 
  called conference. My login Form post to a login dtml method and login dtml 
  method 
  redirect me to another page. Even though the user exists and username and 
  password is 
  correct, somehow zope won't redirect me. The login query window pops out 
  three time and 
  in the end it denied me You are not allowed to access '' in this 
  context. Can someone 
  help me, is there any thing I have to set?? should I move all the files 
  into the root??
 
 It sounds like you're calling a method that's either restricted or set
 to a non-anonymous access level.
 
 What product are you using to allow you to use forms to log in?
 
 Can you post the DTML code?
 
 


___
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] question about login

2005-05-02 Thread Phillip Hutchings
On 03/05/05, Dennis Allison [EMAIL PROTECTED] wrote:
 
 You might take a look at the CookieCrumbler product.  It does pretty much
 what you seem to want  manages much of the hard stuff.

I was getting there ;) Though I don't really appreciate the way
CookieCrumbler stores the passwords...
-- 
Phillip Hutchings
http://www.sitharus.com/
[EMAIL PROTECTED] / [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 )


  1   2   >