[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt there was already an entry for #1895

2005-10-14 Thread Andreas Jung
Log message for revision 39449:
  there was already an entry for #1895
  

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-10-14 14:46:50 UTC 
(rev 39448)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-10-14 14:47:53 UTC 
(rev 39449)
@@ -33,9 +33,6 @@
 
 Bugs Fixed
 
-  - Collector #1895: testrunner: omitting the 'var' from recursive
-directory walking
-
   - OFS.Image.manage_FTPget() would str() it's .data attribute,
 potentially loading the whole file in memory as a
 string. Changed to use RESPONSE.write() iterating through the

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


[Zope-Coders] Zope tests: 8 OK

2005-10-14 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Thu Oct 13 11:01:01 2005 UTC to Fri Oct 14 11:01:01 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:29:42 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003311.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:31:12 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003312.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:32:42 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003313.html

Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:34:12 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003314.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:35:42 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003315.html

Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:37:13 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003316.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:38:43 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003317.html

Subject: OK : Zope-trunk Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Thu Oct 13 22:40:13 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003318.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope] Show ISO-8859-7 Results in a site using UTF-8

2005-10-14 Thread Thomas G. Apostolou
Αρχικό μήνυμα από  Andreas Jung [EMAIL PROTECTED]:

 
 
 --On 13. Oktober 2005 13:20:07 +0300 Thomas G. Apostolou 
 [EMAIL PROTECTED] wrote:
 
 
  Hello all,
  i am using Zope 2.7.0 and i get some results from SQL Server 2000
 with a
  python module's fanction witch i call from with in a DTML Method.
 
 2.7.0 is old. Upgrade!
 
 
  The data is comming encoded in ISO-8859-7 (probably due to
 database
  setup).
  I changed the setting of the default encoding from ZMI to
 ISO-8859-7 for
  the entiry site because of the data (temporarly) but now the same
 tings
  has to be transfered and be part of another site using UTF-8.
 
 
 What is your question? How to migrate strings from iso-8859-7 to
 utf?
 
 -aj
 

Yep! How can I migrate strings from iso-8859-7 to utf-8?
Is there any way to get the entire return set to utf-8?

Here is my code...

def GetData(self, sysDSN=aVoiSys, usr=sa, mypass=atsql2k,
sTable=trdt, sFields=*):
id = self.id
import dbi
import odbc
connection=odbc.odbc(sysDSN+'/'+usr+'/'+mypass)
cur=connection.cursor()
sSQL='Select '+sFields+' from '+sTable
cur.execute(sSQL)
data=cur.fetchall()
cur.close()
connection.close()
return data


Is there any way to return the data encoded in utf-8? It is coming as
ISO-8859-7 from an SQL2K Server...






Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού
___
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] error trying to import smtplib (unauthorized)

2005-10-14 Thread Nicolas Georgakopoulos

Chris Withers wrote:


Nicolas Georgakopoulos wrote:

I will try VerboseSecurity for a last chance ... if it doesn't work I 
will install the lates Zope release.



No, you haven't anyway taken me through, step by step, what you've 
done to get where you are...


What release of Zope are you using?

Chris

I unistall zope and install it again with version Zope-2.8.2-final and 
put your product on C:\Zope-Instance\Products\MailTemplates


I run Zope with admin priviledges and :

1.Created a folder with id MailTesting on the root.

2.Created a MailHost object with id MailHost inside MailTesting folder.

3.Created a MailTemplate object with the id my_mt and selected my 
MailHost object (from step 2) inside MailTesting folder.


4.Created a python script inside MailTesting folder with the id 
send_mail and change your code only in the part : 
mto=('[EMAIL PROTECTED]',[EMAIL PROTECTED]), --  mto='[EMAIL PROTECTED]',


5.Created a file with the id  myfile.bin and loaded a txt file inside 
MailTesting folder.


6.Have changed in _all objects_ and in the _folder_ the _permissions_ on 
the security tab of each one (_I checked all the checkboxes!!!_)


7.Try to run the python script from the test tab ...  :
It prompt for user name and password.
User name and password given correct and it keep prompting the same.
Some how this action log me out from Zope.

8.To check the error log I must log in again.There are 2 errors :

A) admin (admin)  Unauthorized: You are not allowed to access 'add_file' 
in this context  
(when I was trying to test the script with my account )


B) Anonymous User (None) Unauthorized: strongYou are not authorized to 
access this resource./strong  
(when I log on again to see the error log)


traceback for A:
Traceback (innermost last):
 Module ZPublisher.Publish, line 113, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 40, in call_object
 Module Shared.DC.Scripts.Bindings, line 311, in __call__
 Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
 Module Products.PythonScripts.PythonScript, line 323, in _exec
 Module None, line 6, in send_mail
  - PythonScript at /MailTesting/send_mail
  - Line 6
Unauthorized: You are not allowed to access 'add_file' in this context

traceback for B:
Traceback (innermost last):
 Module ZPublisher.Publish, line 104, in publish
 Module ZPublisher.BaseRequest, line 461, in traverse
 Module ZPublisher.HTTPResponse, line 684, in unauthorized
Unauthorized: strongYou are not authorized to access this 
resource./strong


9.If I press cancel when I run the python script your product show me 
this error message:


strongError Type: Unauthorized/strongbr/
strongError Value: You are not allowed to access 'add_file' in this 
context/strongbr/ 



Is that what you want ?

I will install VerboseSecurity (my last hope)

c u ...
___
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] error trying to import smtplib (unauthorized)

2005-10-14 Thread Jens Vagelpohl


On 14 Oct 2005, at 10:41, Nicolas Georgakopoulos wrote:
Sorry for the delay Chris but I read some where that  
VerboseSecurity is made only for Zope 2.7 and some users recommend  
not to install that product because it changes the security  
policies of zope with the authors ...


VerboseSecurity is *integrated* into Zope after 2.8, you don't  
install it separately. You enable it in zope.conf, see the verbose- 
security option.


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] error trying to import smtplib (unauthorized)

2005-10-14 Thread Jens Vagelpohl


On 14 Oct 2005, at 11:02, Nicolas Georgakopoulos wrote:
VerboseSecurity is *integrated* into Zope after 2.8, you don't   
install it separately. You enable it in zope.conf, see the  
verbose- security option.


jens


Thank's Jens I didn't know that. I find it verbose- security   
option in the zope.conf only as an example. Where and how exactly  
you change that?


Please stay on the list. If you want a personal helpdesk I'm glad to  
do it, for money.


The option is not only as an example, it is commented out and thus  
deactivated. Uncomment it.


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] How can i call a pyhton module's function from with in Page Temmplates?

2005-10-14 Thread Chris Withers

Thomas Apostolou wrote:

i saw that from within a DTML Method one is able to
call a fuction of a python module in the file system.


I don't think so...


Now i want to get the funtion's results from within a
Page Template.


Which function? Give us an example of what you've tried...


Is the right way to make a Script(Python) that calls
this module's function and then call this
Script(Python) from within my Page Template?


You should be able to make the call direct from the ZPT, but you'll have 
to tell us what you're trying to do...


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 )


Re: [Zope] selected in select lists

2005-10-14 Thread Chris Withers

Garry Saddington wrote:

DTML:
select name=groupabbrev
dtml-in getpastoralgroups
option value=dtml-var thisgroupabbrev dtml-if 
expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if 
 dtml-var thisgroupabbrev/option

/dtml-in
/select


And just for comparison, here's the ZPT:

select name=groupabbrev
tal:define=abbrev context/groupabbrev
  tal:i repeat=group context/getpastoralgroups
  option tal:define=thisAbbrev group/thisgroupabbrev
  tal:attributes=value thisAbbrev;
  selected python:abbrev==thisAbbrev
  tal:content=thisAbbrev/
/select

Stop using DTML ;-)

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] zope.conf read-only settings

2005-10-14 Thread Chris Withers

Steven Hayles wrote:


AFAICS the directives zserver-read-only-mode and read-only-database just 
set the environment value ZOPE_READ_ONLY and no change in ZOPE's 
operation results. Am I right? This is ZOPE 2.7.7


Not really sure what you're asking?
Did you try these and find they made no difference?

Setting read-only in the database storage does make a difference (in my 
configuration, Formulator 1.6.2 throws an exception, but that's not a 
ZOPE issue).


Okay, maybe that's 'cos Formulator is trying to write to the zodb?

Seriously, not sure what you're asking/explaining...

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 )


Re: [Zope] Zope Debugger lets WingDbg fail to connect toclient

2005-10-14 Thread Chris Withers

Wingware Support wrote:


Because Wing currently doesn't read files from anywhere but the file 
system.  I have looked briefly at zdb, but have not had time to set it 
up yet.  


Man, you are short of time ;-)

Wing's debugger does not use pdb or even the linecache module, 
so zdb's technique of pre-filling the line cache isn't applicable.


That's a shame, you should be able to use something similar though...

Since you also have a need for the co_filename attribute to be set, I 
suggest we try to come up with a monkey patch that we can both use and 
not conflict with each other.


Yep :-)

I don't have Wing, so I can't try WingDbg, but if you could stick zdb 
and WingDbg in the same Zope instance and see what zdb is stomping on 
that's stopping WingDbg working, then I'll see what I can do..


I still think even better would be to get 
a change into Zope so monkey patches aren't required.


Well, zdb adds overhead, so I'd never want its stuff to be intergated...

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 )


Re: [Zope] error trying to import smtplib (unauthorized)

2005-10-14 Thread Chris Withers

Nicolas Georgakopoulos wrote:


FINALLY it work's! I installed VerboseSecurity and repeat the same 
action'sit just work.


Right, well, that's not good news ;-)
As Jens pointed out VerboseSecurity shouldn't be installed in 2.8, which 
I only just found out...


The fact that it makes things work is... interesting.

Anyway, I can now reproduce the issue, and I know what it is, so I'll 
see if I can get it fixed some time soon...


cheers, and thanks for putting up with me trying ot find out what's wrong...

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] ZOPE and INSTANCES

2005-10-14 Thread benmania

Hi guys, 

I installed Zope2.7 and created an instance home in /var/lib/zope2.7/instance
But whenever I try to run a instance by using runzope in 
/var/lib/zope2.7/instance/, I will get the following error: --
-bash: runzope: command not found. 
--
Whenever I try to run the server on the instance, I ll get the following error: 

--
failed: missing required path(/var/lib/zop/cgi-bin/default) 
Waiting instances in late: donae
default: start: missing required path(/var/lib/zop/cgi-bin/default) 
--
__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193

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


Re: [Zope] Zope 2.7.8 or Zope 2.8.X

2005-10-14 Thread Lennart Regebro
On 10/13/05, Dennis Allison [EMAIL PROTECTED] wrote:

 We have been running on Zope 2.7.6 with a few patches.  I am now planning
 to migrate to Zope 2.7.8 but am pondering the move to Zope 2.8.  We are in
 a production situation and cannot accept any downtime, so I am very
 concerned about stability and compatibility.

 Can the list provide words of advice?

If you don't need 2.8, and since 2.7 is still maintained, stay with 2.7.

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


Re: [Zope] zope.conf read-only settings

2005-10-14 Thread S.Hayles


On Fri, 14 Oct 2005, Chris Withers wrote:


Steven Hayles wrote:


AFAICS the directives zserver-read-only-mode and read-only-database just 
set the environment value ZOPE_READ_ONLY and no change in ZOPE's operation 
results. Am I right? This is ZOPE 2.7.7


Not really sure what you're asking?
Did you try these and find they made no difference?


Yes, and I've looked at the code and can't see any way they can make a 
difference.


Wondered whether anyone else knew anything about these directives (old or 
future functionality?) and whether I was right in thinking they didn't do 
anything. If they really don't and are never intended to do anything, then 
they should at least have comments to that effect, and ideally be removed.


Setting read-only in the database storage does make a difference (in my 
configuration, Formulator 1.6.2 throws an exception, but that's not a ZOPE 
issue).


Okay, maybe that's 'cos Formulator is trying to write to the zodb?


I think so.


Seriously, not sure what you're asking/explaining...


Just a related observation.


Steven

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

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


Re: [Zope] ZOPE and INSTANCES

2005-10-14 Thread Andreas Jung



--On 14. Oktober 2005 13:40:02 +0200 [EMAIL PROTECTED] wrote:



Hi guys,

I installed Zope2.7 and created an instance home in
/var/lib/zope2.7/instance But whenever I try to run a instance by using
runzope in /var/lib/zope2.7/instance/, I will get the following error:
-- -bash: runzope: command not found.


runzope sits in instance/bin/runzope

-aj




pgpkn6xrlyVY4.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] error trying to import smtplib (unauthorized)

2005-10-14 Thread Nicolas Georgakopoulos

Chris Withers wrote:


Nicolas Georgakopoulos wrote:



FINALLY it work's! I installed VerboseSecurity and repeat the same 
action'sit just work.



Right, well, that's not good news ;-)
As Jens pointed out VerboseSecurity shouldn't be installed in 2.8, 
which I only just found out...


The fact that it makes things work is... interesting.

Anyway, I can now reproduce the issue, and I know what it is, so I'll 
see if I can get it fixed some time soon...


cheers, and thanks for putting up with me trying ot find out what's 
wrong...


Chris


thank you for your support !

keep the good work.

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

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


Re: [Zope] ZOPE and INSTANCES

2005-10-14 Thread Andreas Pakulat
On 14.10.05 13:40:02, [EMAIL PROTECTED] wrote:
 I installed Zope2.7 and created an instance home in /var/lib/zope2.7/instance
 But whenever I try to run a instance by using runzope in 
 /var/lib/zope2.7/instance/, I will get the following error: --
 -bash: runzope: command not found. 

Please read the documentation for zope (found in
/usr/share/doc/zope2.7) and maybe also an introduction to Linux systems.
Your shell cannot find the runzope script, as there is none in the
instance directory.

 --
 Whenever I try to run the server on the instance, I ll get the following 
 error: 

I guess you mean running /etc/init.d/zope27 start? Hmm, no you probably
mean zopectl start... The Debian package is set up to start all
instances in /var/lib/zope2.7/instance when starting zope via
/etc/init.d/zope2.7 start. The runzope and zopectl scripts are useful if
you want to up/down a specific instance among a list of instances...

 --
 failed: missing required path(/var/lib/zop/cgi-bin/default) 

That looks like a screwed setup. Did you remove any old stuff from the
zope 2.6 package you installed before? Do a dpkg -P zope and also check
that there is no /etc/init.d/zope, no /etc/zope/ directory and no
/var/lib/zope

And I also hope that you used mkzope2.7instance to create the instance.

 Waiting instances in late: donae

Hmm, that looks like the instance got up, can you browse to
localhost:9673 and see the zope page?

Andreas

PS: I just did a apt-get install zope2.7 followed by a mkzope2.7instance
and a /etc/init.d/zope2.7 start and can browse the fresh zope instance.

-- 
You will soon meet a person who will play an important role in your life.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope 2.8.2 released

2005-10-14 Thread Paul Winkler
On 10/14/05, Andreas Jung [EMAIL PROTECTED] wrote:
  OK, done for 2.8 branch. But I'm leaving the trunk alone, as it looks
  like lots of stuff from 2.8 is not yet in the trunk CHANGES.txt,
  and I don't want to confuse things further - AFAICT the normal procedure
  is to let the release manager handle the merging of bugfixes in
  CHANGES.txt.
 

 It  is basically up to the guy fixing stuff to update CHANGES.txt as well.
 I can not be after every single checkin messages.


Of course.  But http://www.zope.org/DevHome/Subversion/ZopeDevelopmentProcess
says: When you check in a bug fix, you almost always need to ,,, Note
the fix in the /doc/CHANGES.txt on the current release branch ... Note
that you don't need to note the fix in the CHANGES.txt on the trunk if
you don't want to. At the time a new feature release is made, we merge
the items in CHANGES.txt from the trunk and current release branch
...

And in this case you are the guy who applied the patch to the trunk,
so I assumed you
were satisfied. If you want me to note it on the trunk, I will.  Is
that too much of a pain
for the release manager? Should ZopeDevelopmentProcess be changed?

--
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] error trying to import smtplib (unauthorized)

2005-10-14 Thread Chris Withers

Hi Nicolas,

Nicolas Georgakopoulos wrote:


thank you for your support !


Right, I'm not gonna get to do a new release as soon as I'd like since 
there are a few more issues I want to solve. However, as the one you 
found is a bit of a showstopper as far as using MailTemplates to send 
attachments is concerned, please find attached a patch for 
MTMultipart.py that will solve the problem for the time being...


I've also opened an issue for this in the support system:
https://secure.simplistix.co.uk/support/issue184

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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread hpinson
Hello. On starting and stopping Zope 2.8.2 (upgraded from 2.8.1, 
compiled with Python 2.4.2, running on Fedora Core 3) I get the 
following error. Performance does not seem to be affected.  
Resolution?

# service zopectl start
/opt/python2.4.2/lib/python2.4/whrandom.py:38: DeprecationWarning: 
the whrandom module is deprecated; please use the random module
  DeprecationWarning)
. daemon process started, pid=22829

# service zopectl stop
/opt/python2.4.2/lib/python2.4/whrandom.py:38: DeprecationWarning: 
the whrandom module is deprecated; please use the random module
  DeprecationWarning)
. daemon process stopped


-- 
Harlow Pinson
Indepth Learning
Email: [EMAIL PROTECTED]
Phone: 505 994-2135
Fax: 505 994-3603

___
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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread Jens Vagelpohl


On 14 Oct 2005, at 17:09, [EMAIL PROTECTED] wrote:


Hello. On starting and stopping Zope 2.8.2 (upgraded from 2.8.1,
compiled with Python 2.4.2, running on Fedora Core 3) I get the
following error. Performance does not seem to be affected.
Resolution?

# service zopectl start
/opt/python2.4.2/lib/python2.4/whrandom.py:38: DeprecationWarning:
the whrandom module is deprecated; please use the random module
  DeprecationWarning)
. daemon process started, pid=22829

# service zopectl stop
/opt/python2.4.2/lib/python2.4/whrandom.py:38: DeprecationWarning:
the whrandom module is deprecated; please use the random module
  DeprecationWarning)
. daemon process stopped


If this was an error, it would say error. This is a warning.

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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread Pascal Peregrina
From the Zope 2.8.2 announcement on this mailing list : 
 Please also keep in mind that Zope 2.8.2 requires Python 2.3.5. Zope
 2.8.2 is not certified for any Python 2.4.x versions. So using Python
 2.4 is  neither recommended nor supported and any related questions or 
 problems are  likely to be ignored until 2.4 is an officially 
 supported Python version  for Zope.

Pascal

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jens
Vagelpohl
Sent: 14 October 2005 17:12
To: Zope ML
Subject: Re: [Zope] Error on starting and stopping Zope 2.8.2


On 14 Oct 2005, at 17:09, [EMAIL PROTECTED] wrote:

 Hello. On starting and stopping Zope 2.8.2 (upgraded from 2.8.1, 
 compiled with Python 2.4.2, running on Fedora Core 3) I get the 
 following error. Performance does not seem to be affected.
 Resolution?

 # service zopectl start
 /opt/python2.4.2/lib/python2.4/whrandom.py:38: DeprecationWarning:
 the whrandom module is deprecated; please use the random module
   DeprecationWarning)
 . daemon process started, pid=22829

 # service zopectl stop
 /opt/python2.4.2/lib/python2.4/whrandom.py:38: DeprecationWarning:
 the whrandom module is deprecated; please use the random module
   DeprecationWarning)
 . daemon process stopped

If this was an error, it would say error. This is a warning.

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 )


**
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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread Andreas Jung



--On 14. Oktober 2005 10:09:39 -0600 [EMAIL PROTECTED] wrote:


Hello. On starting and stopping Zope 2.8.2 (upgraded from 2.8.1,
compiled with Python 2.4.2, running on Fedora Core 3) I get the
following error. Performance does not seem to be affected.
Resolution?



Quote from my announcement yesterday:


Please also keep in mind that Zope 2.8.2 requires Python 2.3.5. Zope 2.8.2
is not certified for any Python 2.4.x versions. So using Python 2.4 is 
neither recommended nor supported and any related questions or problems are 
likely to be ignored until 2.4 is an officially supported Python version 
for Zope.



:-)

-aj


pgphMZeNcVCWJ.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] resolving conflict errors

2005-10-14 Thread Dennis Allison

Zope 2.7.6

I am a bit confused.  

I have a Zope DTML method that is generating ZODB conflict errors.

The DTML method identified as producing the conflicts is a list of calls
to other methods, conditionally executed.

Most conflicts don't cause problems because the backoff and restart of the 
initial transaction will not have changed global state.  In our particular
case, the conflicting transaction has changed global state in our RDBMS so
when it gets rerun, some RDBMS transactions are duplicated.  And that's a 
problem.  The solution, of course, is to resolve the conflicts properly.

The first question: what data is generating the conflict?  The DTML code 
and all the method references are static and unchanged.   What data does
Zope store in the ZODB when an object is evaluated? 

Presumably conflicts can be reolved programatically by setting a method 
on the object

   _p_resolveConflict( self, old, saved, new )

and returning one or another of the states (old, saved, new).   It's not 
real clear how to do it.   


  









 

-- 



___
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] resolving conflict errors

2005-10-14 Thread Chris McDonough
On Fri, 2005-10-14 at 09:27 -0700, Dennis Allison wrote:
 Zope 2.7.6
 
 I am a bit confused.  
 
 I have a Zope DTML method that is generating ZODB conflict errors.
 
 The DTML method identified as producing the conflicts is a list of calls
 to other methods, conditionally executed.
 
 Most conflicts don't cause problems because the backoff and restart of the 
 initial transaction will not have changed global state.  In our particular
 case, the conflicting transaction has changed global state in our RDBMS so
 when it gets rerun, some RDBMS transactions are duplicated.  And that's a 
 problem.  The solution, of course, is to resolve the conflicts properly.

Another solution is to use a RDBMS that fully supports transactions.
This is almost always the easiest solution.  ConflictErrors are a fact
of life if you use ZODB to store data; they are impossible to eliminate
entirely so no matter what, if you need to communicate with external
data stores that aren't transactional (MyISAM tables, LDAP, sendmail,
etc.) you need to anticipate duplicated requests in the code that
communicates with these systems.  For example, Jens Vagelpohl has a
replacement for Zope's MailHost that prevents retried requests due to
conflict errors from causing a mail to be resent.  I've written payment
systems that anticipate the fact that the request may be retried, so
instead of submitting the payment request twice, the code keeps around a
little cache about what it did last so it doesn't do it again.  And so
on.

 The first question: what data is generating the conflict?  

I believe that if you run Zope event logging at BLATHER level, the
traceback of every ConflictError exception is logged, which can give you
an idea of what is causing the errors.

 The DTML code 
 and all the method references are static and unchanged.   What data does
 Zope store in the ZODB when an object is evaluated? 

None that you don't tell it to.  Typically conflict errors are a result
of two threads calling code which changes the same object at the same
time, but nothing that Zope does under the hood causes it; it is
always caused by application code.

One exception to this rule is conflict errors raised when using Zope
sessions.  It's not actually an exception to the rule, but programmers
are shielded from the fact that sessions store data in ZODB when you use
the session API (e.g. REQUEST.SESSION).  The sessioning machinery needs
to manage housekeeping info whenever the API is used to expire old
sessions and create new ones, so although it may not look like you are
writing to the ZODB when you use sessions (even to read data out of
them), you potentially are. 

Zope 2.8 has a ZODB that support multiversion concurrency control, which
eliminates a certain class of conflict errors (read conflict errors), so
if you are getting a lot of these, and you can get away with using 2.8,
I'd suggest doing so.

 Presumably conflicts can be reolved programatically by setting a method 
 on the object
 
_p_resolveConflict( self, old, saved, new )
 
 and returning one or another of the states (old, saved, new). It's 
 not 
 real clear how to do it.   

There are examples of real-world conflict resolution using this
mechanism in the Transience product included in Zope's
lib/python/Products.

- C


___
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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread hpinson
 Please also keep in mind that Zope 2.8.2 requires Python 2.3.5. Zope 2.8.2
 is not certified for any Python 2.4.x versions. So using Python 2.4 is 
 neither recommended nor supported and any related questions or problems are 
 likely to be ignored until 2.4 is an officially supported Python version 
 for Zope.

My mistake, but given that, any sense if I can I safely ignore the 
warning?

So far, things seems to be running well under Python 2.4.2. The 
instance contains a Plone 2.1 site and lots of DTML/ZSQL stuff, which 
appear unaffected. 




-- 
Harlow Pinson
Indepth Learning
Email: [EMAIL PROTECTED]
Phone: 505 994-2135
Fax: 505 994-3603

___
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] resolving conflict errors

2005-10-14 Thread Dennis Allison

Thanks Chris.  On point as usual!

I was unaware that the session mechanism used the ZODB although a bit of
thought says it has to.  We don't store any data into the ZODB in these
methods, but we do use the session mechanism heavily.

I suppose that moving to a fully transactional database system would be 
the simplest solution, but I'm a bit wary of doing so on a live system.



On Fri, 14 Oct 2005, Chris McDonough wrote:

 On Fri, 2005-10-14 at 09:27 -0700, Dennis Allison wrote:
  Zope 2.7.6
  
  I am a bit confused.  
  
  I have a Zope DTML method that is generating ZODB conflict errors.
  
  The DTML method identified as producing the conflicts is a list of calls
  to other methods, conditionally executed.
  
  Most conflicts don't cause problems because the backoff and restart of the 
  initial transaction will not have changed global state.  In our particular
  case, the conflicting transaction has changed global state in our RDBMS so
  when it gets rerun, some RDBMS transactions are duplicated.  And that's a 
  problem.  The solution, of course, is to resolve the conflicts properly.
 
 Another solution is to use a RDBMS that fully supports transactions.
 This is almost always the easiest solution.  ConflictErrors are a fact
 of life if you use ZODB to store data; they are impossible to eliminate
 entirely so no matter what, if you need to communicate with external
 data stores that aren't transactional (MyISAM tables, LDAP, sendmail,
 etc.) you need to anticipate duplicated requests in the code that
 communicates with these systems.  For example, Jens Vagelpohl has a
 replacement for Zope's MailHost that prevents retried requests due to
 conflict errors from causing a mail to be resent.  I've written payment
 systems that anticipate the fact that the request may be retried, so
 instead of submitting the payment request twice, the code keeps around a
 little cache about what it did last so it doesn't do it again.  And so
 on.
 
  The first question: what data is generating the conflict?  
 
 I believe that if you run Zope event logging at BLATHER level, the
 traceback of every ConflictError exception is logged, which can give you
 an idea of what is causing the errors.
 
  The DTML code 
  and all the method references are static and unchanged.   What data does
  Zope store in the ZODB when an object is evaluated? 
 
 None that you don't tell it to.  Typically conflict errors are a result
 of two threads calling code which changes the same object at the same
 time, but nothing that Zope does under the hood causes it; it is
 always caused by application code.
 
 One exception to this rule is conflict errors raised when using Zope
 sessions.  It's not actually an exception to the rule, but programmers
 are shielded from the fact that sessions store data in ZODB when you use
 the session API (e.g. REQUEST.SESSION).  The sessioning machinery needs
 to manage housekeeping info whenever the API is used to expire old
 sessions and create new ones, so although it may not look like you are
 writing to the ZODB when you use sessions (even to read data out of
 them), you potentially are. 
 
 Zope 2.8 has a ZODB that support multiversion concurrency control, which
 eliminates a certain class of conflict errors (read conflict errors), so
 if you are getting a lot of these, and you can get away with using 2.8,
 I'd suggest doing so.
 
  Presumably conflicts can be reolved programatically by setting a method 
  on the object
  
 _p_resolveConflict( self, old, saved, new )
  
  and returning one or another of the states (old, saved, new).   It's 
  not 
  real clear how to do it.   
 
 There are examples of real-world conflict resolution using this
 mechanism in the Transience product included in Zope's
 lib/python/Products.
 
 - C
 
 

-- 

___
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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread Tim Peters
[ [EMAIL PROTECTED]
 My mistake, but given that, any sense if I can I safely ignore the
 warning?

It's a DeprecationWarning.  All it means is that Python's `whrandom`
module is going to go away in a future release -- it's advising
applications to switch to using the `random` module if they want to
continue to work under future releases.  It's purely advisory, and in
no sense points at a problem.

 So far, things seems to be running well under Python 2.4.2. The
 instance contains a Plone 2.1 site and lots of DTML/ZSQL stuff, which
 appear unaffected.

Python 2.4.2 works fine.  That's not the concern.  The Zope concern
for moving to any new Python release isn't that Python may be buggy,
it's that a new Python release may introduce new behaviors that open
security holes in Zope.  Until a security audit is performed (which
is done by expert humans), and any new security holes that may be
discovered get plugged, 2.4.2 will remain unsupported for use with
Zope 2.

In contrast, Python 2.4 is now _required_ for Zope 3 development. 
Zope 3 has a different approach to security, which isn't as sensitive
to changes in Python.
___
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] Error on starting and stopping Zope 2.8.2

2005-10-14 Thread hpinson
 It's a DeprecationWarning. 
 
I see. Thanks.

 In contrast, Python 2.4 is now _required_ for Zope 3 development. 
 Zope 3 has a different approach to security, which isn't as sensitive
 to changes in Python.

Good point-- this is why I had compiled 2.8.2 erroneously with Python 
2.4.2-- I was experimenting with Zope 3 instance, and had read the 
docs recommending Py 2.4.2.  My bad assumption was to take the same 
approach with Python 2.8.2. Fortunatly I have 2.3.5 installed along 
side 2.4.2 and can revert to that.


-- 
Harlow Pinson
Indepth Learning
Email: [EMAIL PROTECTED]
Phone: 505 994-2135
Fax: 505 994-3603

___
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] Need for advice ...

2005-10-14 Thread Enrique Arizón
 By desire of the gods and the ebays lords a bargain
Sun Enterprise 250 arrived to my hands this week.

 The machine is equiped with 6x50GBytes SCSI HDs that
can be setup in RAID 0, 1, 5 and 01 combinations and
two Sparc 64bits CPUs with Solaris 10. The idea is to
use it mainly for Zope/ZEO/Plone hostings.

 Anyone has experience or knows of sources of
documentation for tunning a simmilar system to take
the most of Zope (ZODB tricks, ZEO setup,...)?

 Thanks in advance for any help!



___
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] Need for advice ...

2005-10-14 Thread Andreas Jung



--On 14. Oktober 2005 20:24:28 +0200 Enrique Arizón 
[EMAIL PROTECTED] wrote:



 By desire of the gods and the ebays lords a bargain
Sun Enterprise 250 arrived to my hands this week.

 The machine is equiped with 6x50GBytes SCSI HDs that
can be setup in RAID 0, 1, 5 and 01 combinations and
two Sparc 64bits CPUs with Solaris 10. The idea is to
use it mainly for Zope/ZEO/Plone hostings.



I've seen worser hardware in my life. No idea what your goals are but you 
should start with a standard ZEO setup using one ZEO server and a ZEO 
client. Plone loves a lot of memory. When you run Zope/Plone then caching 
is likely more important than a perfect ZEO setup from the performance 
point of view. Such a setup always requires tweaking and tuning over a 
period of time. However this depends highly on your needs and goal.


Andreas

pgpOfLwBRrJ10.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] Need for advice ...

2005-10-14 Thread Andreas Jung



--On 14. Oktober 2005 20:24:28 +0200 Enrique Arizón 
[EMAIL PROTECTED] wrote:



 By desire of the gods and the ebays lords a bargain
Sun Enterprise 250 arrived to my hands this week.

 The machine is equiped with 6x50GBytes SCSI HDs that
can be setup in RAID 0, 1, 5 and 01 combinations and
two Sparc 64bits CPUs with Solaris 10. The idea is to
use it mainly for Zope/ZEO/Plone hostings.



I've seen worser hardware in my life. No idea what your goals are but you 
should start with a standard ZEO setup using one ZEO server and a ZEO 
client. Plone loves a lot of memory. When you run Zope/Plone then caching 
is likely more important than a perfect ZEO setup from the performance 
point of view. Such a setup always requires tweaking and tuning over a 
period of time. However this depends highly on your needs and goal.


Andreas

pgpqUcSMhh90Y.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] selected in select lists

2005-10-14 Thread Garry Saddington

Chris Withers wrote:


Garry Saddington wrote:


DTML:
select name=groupabbrev
dtml-in getpastoralgroups
option value=dtml-var thisgroupabbrev dtml-if 
expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if 
 dtml-var thisgroupabbrev/option

/dtml-in
/select



And just for comparison, here's the ZPT:

select name=groupabbrev
tal:define=abbrev context/groupabbrev
  tal:i repeat=group context/getpastoralgroups
  option tal:define=thisAbbrev group/thisgroupabbrev
  tal:attributes=value thisAbbrev;
  selected python:abbrev==thisAbbrev
  tal:content=thisAbbrev/
/select

Stop using DTML ;-)

Chris

This code does not work;-). If I always work in the ZMI and do not 
collaborate with designers on database web applications where the data
is more important than the presentation, can you give me a good reason 
for not using DTML. I find DTML more intuitive than ZPT and once you get 
the hang of
the namespace magic thing it is not that bad. The ZPT code above seems 
to me more complex and it has defined two new variables, whereas the 
DTML only has two variables

and a string conversion.
Regards
Garry
ps. I would use ZPT if I could see a valid reason to do so.

___
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] Backing up Zope

2005-10-14 Thread curtorkar
Hi,
Can anyone advise me on backing up zope. Our license is going to expire soon, 
and before we get the new license, I would like to have a backup of my existing 
setup.

--Walter
___
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] Backing up Zope

2005-10-14 Thread Jens Vagelpohl


On 14 Oct 2005, at 20:29, [EMAIL PROTECTED] wrote:


Hi,
Can anyone advise me on backing up zope. Our license is going to  
expire soon, and before we get the new license, I would like to  
have a backup of my existing setup.


Huh? Zope does not have any license that expires... what exactly are  
you talking about?


You back up Zope by backing up the software and the database file.

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] Backing up Zope

2005-10-14 Thread Jake
http://www.zopezone.com/faq/1128712607
-- 
http://www.ZopeZone.com


[EMAIL PROTECTED] said:
 Hi,
 Can anyone advise me on backing up zope. Our license is going to expire
 soon, and before we get the new license, I would like to have a backup of
 my existing setup.

 --Walter
 ___
 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] apache open proxy configuration problem

2005-10-14 Thread Ed Colmar
I've been running zope through apache for years and years now, and I 
have a new machine set up with apache 2.0.48 and zope (Zope 2.8.0-final, 
python 2.3.5, linux2)


Using Identical Vhost configuration settings from an old machine all has 
been well, up until about 5 days ago, when I noticed the machine getting 
slammed, and wierd logs started showing up like:


xxx.xxx.xxx.xxx - - [14/Oct/2005:14:09:06 -0700] GET 
http://partners.mygeek.com:80/search.jsp?partnerid=98885pagesize=12 
HTTP/1.1 403 406


(IP removed to protect the guilty)

In my quick research to try to determine the problem, I found people 
advising to turn ProxyRequests Off, which I did, but did not have any 
effect.


Luckily this is just a development server, not a live production server, 
so its not super critical, but I'm nervous now that my production server 
might be in the same state...


Here is a sample vhost.conf entry:

NameVirtualHost 192.168.1.32
VirtualHost 192.168.1.32
ServerName www.greengraphics.net
ServerPath /var/www/greengraphics/www
DocumentRoot /var/www/greengraphics/www
ServerAdmin webmaster
RewriteEngine On
TransferLog logs/Vhost-greengraphics-access.log
ProxyRequests Off
   Proxy *
   Order deny,allow
   Allow from all
   /Proxy
ProxyPass / 
http://192.168.1.32:8080/VirtualHostBase/http/www.greengraphics.net:80/greengraphics/VirtualHostRoot/
ProxyPassReverse / 
http://192.168.1.32:8080/VirtualHostBase/http/www.greengraphics.net:80/greengraphics/VirtualHostRoot/

/VirtualHost



mod_proxy.conf looks like:




IfDefine HAVE_PROXY
 IfModule !mod_proxy.c
   LoadModule proxy_module modules/mod_proxy.so
   #LoadModule proxy_connect_modulemodules/mod_proxy_connect.so
   #LoadModule proxy_ftp_modulemodules/mod_proxy_ftp.so
   LoadModule proxy_http_modulemodules/mod_proxy_http.so
 /IfModule
/IfDefine

IfModule mod_proxy.c

#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#

ProxyRequests Off

Proxy *
   Order deny,allow
   Deny from all
#Allow from .your-domain.com
/Proxy

#
# Enable/disable the handling of HTTP/1.1 Via: headers.
# (Full adds the server version; Block removes all outgoing Via: 
headers)

# Set to one of: Off | On | Full | Block
#

ProxyVia On

# End of proxy directives.

/IfModule


any suggestions?  places to look to verify security?

Thanks!

-ed
___
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] Deleting objects from an external method

2005-10-14 Thread Nikko Wolf


I'm trying to allow users to delete objects that have been accidentally 
created.  I have criteria for what that means, but since I *DO NOT* want 
them to delete object except by this method, I want to avoid granting 
Delete objects to them (non-Managers).


Can this even be done?  At the base level, Delete objects is a 
hard-coded requirement of the ObjectManager.manage_delObjects() function.


One solution that I considered is to create a new role with the 
privilege, then within my ExternalMethod:

 - grant the role to the user for the folder,
 - delete the object,
 - remove the role for that user for the folder

But this seems overly tedious, and a problem if the script terminates 
before removing the role.  Similarly, it could use the Manager role in 
the same scenario, but this seems dangerous.


Any insights appreciated,
Nikko

PS: This seems on-topic, but using the code shown did not seem to have 
any effect:


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

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


Re: [Zope] selected in select lists

2005-10-14 Thread Tino Wildenhain
Am Freitag, den 14.10.2005, 20:03 +0100 schrieb Garry Saddington:
 Chris Withers wrote:
 
  Garry Saddington wrote:
 
  DTML:
  select name=groupabbrev
  dtml-in getpastoralgroups
  option value=dtml-var thisgroupabbrev dtml-if 
  expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if 
   dtml-var thisgroupabbrev/option
  /dtml-in
  /select
 
 
  And just for comparison, here's the ZPT:
 
  select name=groupabbrev
  tal:define=abbrev context/groupabbrev
tal:i repeat=group context/getpastoralgroups
option tal:define=thisAbbrev group/thisgroupabbrev
tal:attributes=value thisAbbrev;
selected python:abbrev==thisAbbrev
tal:content=thisAbbrev/
  /select
 
  Stop using DTML ;-)
 
  Chris
 
 This code does not work;-). If I always work in the ZMI and do not 
 collaborate with designers on database web applications where the data
 is more important than the presentation, can you give me a good reason 
 for not using DTML. I find DTML more intuitive than ZPT and once you get 
 the hang of
 the namespace magic thing it is not that bad. The ZPT code above seems 
 to me more complex and it has defined two new variables, whereas the 
 DTML only has two variables
 and a string conversion.
 Regards
 Garry
 ps. I would use ZPT if I could see a valid reason to do so.

The example above is unfortunatly a bit bad from app design view.
You should either do the comparison in your ZSQL Method
or wrap the call to the ZSQL method in a simple python script.

Then all your ZPT reduces to:

select name=groupabbrev
 option 
tal:repeat=group here/getpastoralgroups
tal:attributes=value group/groupabbrev; selected group/selected
tal:content=thisgroupabbrev Example /option
/select

Which is imho much better to read then the code above.
All you need to do is to deliver True/False, None/Something
for the selected field. 

Not doing the comparison in your Template (no matter if DTML
or ZPT) really makes live easier.

You should try to get your Application right independend of
any HTML output. (e.g. you can call the scripts/ZPTs directly
to find out whats going on)

HTH
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] apache open proxy configuration problem

2005-10-14 Thread Kanealii, Priam Mr KRS
Title: RE: [Zope] apache open proxy configuration problem





I abandoned mod_proxy for mod_rewrite. Security-wise, mod_rewrite had
less to worry about (this is important when website administration
changes hands).


The sample configuration below shows how to handle Zope resource
quirks and how to proxy requests to and from folders in Zope (both
tested). The last rule is my guess at what proxy everything to and
from Zope would look like (untested). Apache is listening on 80 and
routes requests to a Zope instance listening on 8080.


IfModule mod_rewrite.c


 RewriteEngine On
 RewriteLog /path/to/rewrite_log


 # Zope serves some system-ish content from p_ and misc_.
 RewriteRule ^/p_(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}/VirtualHostRoot/p_$1 [L,P]
 RewriteRule ^/misc_(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}/VirtualHostRoot/misc_$1 [L,P]


 # Apache folders served by Zope folders.
 RewriteRule ^/folder1(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}/VirtualHostRoot/folder1$1 [L,P]
 RewriteRule ^/folder2(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}/VirtualHostRoot/folder2$1 [L,P]


 # Push everything to Zope?
 RewriteRule ^(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}/VirtualHostRoot/$1 [L,P]


/IfModule


Aloha,
Priam


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Ed Colmar
Sent: Saturday, October 15, 2005 9:19 AM
To: zope@zope.org
Subject: [Zope] apache open proxy configuration problem


I've been running zope through apache for years and years now, and I 
have a new machine set up with apache 2.0.48 and zope (Zope 2.8.0-final, 
python 2.3.5, linux2)


Using Identical Vhost configuration settings from an old machine all has 
been well, up until about 5 days ago, when I noticed the machine getting 
slammed, and wierd logs started showing up like:


xxx.xxx.xxx.xxx - - [14/Oct/2005:14:09:06 -0700] GET 
http://partners.mygeek.com:80/search.jsp?partnerid=98885=12 
HTTP/1.1 403 406


(IP removed to protect the guilty)


In my quick research to try to determine the problem, I found people 
advising to turn ProxyRequests Off, which I did, but did not have any 
effect.


Luckily this is just a development server, not a live production server, 
so its not super critical, but I'm nervous now that my production server 
might be in the same state...


Here is a sample vhost.conf entry:


NameVirtualHost 192.168.1.32
VirtualHost 192.168.1.32
ServerName www.greengraphics.net
ServerPath /var/www/greengraphics/www
DocumentRoot /var/www/greengraphics/www
ServerAdmin webmaster
RewriteEngine On
TransferLog logs/Vhost-greengraphics-access.log
ProxyRequests Off
 Proxy *
 Order deny,allow
 Allow from all
 /Proxy
ProxyPass / 
http://192.168.1.32:8080/VirtualHostBase/http/www.greengraphics.net:80/greengraphics/VirtualHostRoot/
ProxyPassReverse / 
http://192.168.1.32:8080/VirtualHostBase/http/www.greengraphics.net:80/greengraphics/VirtualHostRoot/
/VirtualHost




mod_proxy.conf looks like:





IfDefine HAVE_PROXY
 IfModule !mod_proxy.c
 LoadModule proxy_module modules/mod_proxy.so
 #LoadModule proxy_connect_module modules/mod_proxy_connect.so
 #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
 LoadModule proxy_http_module modules/mod_proxy_http.so
 /IfModule
/IfDefine


IfModule mod_proxy.c


#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#


ProxyRequests Off


Proxy *
 Order deny,allow
 Deny from all
# Allow from .your-domain.com
/Proxy


#
# Enable/disable the handling of HTTP/1.1 Via: headers.
# (Full adds the server version; Block removes all outgoing Via: 
headers)
# Set to one of: Off | On | Full | Block
#


ProxyVia On


# End of proxy directives.


/IfModule



any suggestions? places to look to verify security?


Thanks!


-ed
___
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] selected in select lists

2005-10-14 Thread Garry Saddington

Tino Wildenhain wrote:


Am Freitag, den 14.10.2005, 20:03 +0100 schrieb Garry Saddington:
 


Chris Withers wrote:

   


Garry Saddington wrote:

 


DTML:
select name=groupabbrev
dtml-in getpastoralgroups
option value=dtml-var thisgroupabbrev dtml-if 
expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if 
dtml-var thisgroupabbrev/option

/dtml-in
/select
   


And just for comparison, here's the ZPT:

select name=groupabbrev
   tal:define=abbrev context/groupabbrev
 tal:i repeat=group context/getpastoralgroups
 option tal:define=thisAbbrev group/thisgroupabbrev
 tal:attributes=value thisAbbrev;
 selected python:abbrev==thisAbbrev
 tal:content=thisAbbrev/
/select

Stop using DTML ;-)

Chris

 

This code does not work;-). If I always work in the ZMI and do not 
collaborate with designers on database web applications where the data
is more important than the presentation, can you give me a good reason 
for not using DTML. I find DTML more intuitive than ZPT and once you get 
the hang of
the namespace magic thing it is not that bad. The ZPT code above seems 
to me more complex and it has defined two new variables, whereas the 
DTML only has two variables

and a string conversion.
Regards
Garry
ps. I would use ZPT if I could see a valid reason to do so.
   



The example above is unfortunatly a bit bad from app design view.
You should either do the comparison in your ZSQL Method
or wrap the call to the ZSQL method in a simple python script.

Then all your ZPT reduces to:

select name=groupabbrev
option 
   tal:repeat=group here/getpastoralgroups

   tal:attributes=value group/groupabbrev; selected group/selected
   tal:content=thisgroupabbrev Example /option
/select

Which is imho much better to read then the code above.
All you need to do is to deliver True/False, None/Something
for the selected field. 


Not doing the comparison in your Template (no matter if DTML
or ZPT) really makes live easier.

You should try to get your Application right independend of
any HTML output. (e.g. you can call the scripts/ZPTs directly
to find out whats going on)

HTH
Tino Wildenhain



 

The comparison is dynamic. The user selects an option, that option is 
passed to a formhandler and hence back to the referring method.  How 
could I not do the comparison in this method? If it could be done in a 
python script as you say, why should I inject another layer of 
complexity into my application when the one dtml method will do the job?
imho such a problem as selected in selects should have a well documented 
solution as many developers will need it and why should each one have to 
find the solution for themselves?
I think Zope is the most important technology on the Internet at 
present, with the possibility to become really huge, but if every 
developer has to search so hard for solutions as I have had to, it will 
forever be a niche product.

regards
Garry

___
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] selected in select lists

2005-10-14 Thread David H

Garry Saddington wrote:


Tino Wildenhain wrote:


Am Freitag, den 14.10.2005, 20:03 +0100 schrieb Garry Saddington:
 


Chris Withers wrote:

  


Garry Saddington wrote:




DTML:
select name=groupabbrev
dtml-in getpastoralgroups
option value=dtml-var thisgroupabbrev dtml-if 
expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if 
dtml-var thisgroupabbrev/option

/dtml-in
/select
  


And just for comparison, here's the ZPT:

select name=groupabbrev
   tal:define=abbrev context/groupabbrev
 tal:i repeat=group context/getpastoralgroups
 option tal:define=thisAbbrev group/thisgroupabbrev
 tal:attributes=value thisAbbrev;
 selected python:abbrev==thisAbbrev
 tal:content=thisAbbrev/
/select

Stop using DTML ;-)

Chris




This code does not work;-). If I always work in the ZMI and do not 
collaborate with designers on database web applications where the data
is more important than the presentation, can you give me a good 
reason for not using DTML. I find DTML more intuitive than ZPT and 
once you get the hang of
the namespace magic thing it is not that bad. The ZPT code above 
seems to me more complex and it has defined two new variables, 
whereas the DTML only has two variables

and a string conversion.
Regards
Garry
ps. I would use ZPT if I could see a valid reason to do so.
  



The example above is unfortunatly a bit bad from app design view.
You should either do the comparison in your ZSQL Method
or wrap the call to the ZSQL method in a simple python script.

Then all your ZPT reduces to:

select name=groupabbrev
optiontal:repeat=group here/getpastoralgroups
   tal:attributes=value group/groupabbrev; selected group/selected
   tal:content=thisgroupabbrev Example /option
/select

Which is imho much better to read then the code above.
All you need to do is to deliver True/False, None/Something
for the selected field.
Not doing the comparison in your Template (no matter if DTML
or ZPT) really makes live easier.

You should try to get your Application right independend of
any HTML output. (e.g. you can call the scripts/ZPTs directly
to find out whats going on)

HTH
Tino Wildenhain



 

The comparison is dynamic. The user selects an option, that option is 
passed to a formhandler and hence back to the referring method.  How 
could I not do the comparison in this method? If it could be done in a 
python script as you say, why should I inject another layer of 
complexity into my application when the one dtml method will do the job?
imho such a problem as selected in selects should have a well 
documented solution as many developers will need it and why should 
each one have to find the solution for themselves?
I think Zope is the most important technology on the Internet at 
present, with the possibility to become really huge, but if every 
developer has to search so hard for solutions as I have had to, it 
will forever be a niche product.

regards
Garry

_


Garry,
You argue sucessfully re: DTML vs ZPT on some of the grounds you articulate.
Although the particulars of your app are not so significant.

Calls to python scripts hardly add complexity - its just the opposite..  
Have you noticed a simpler language than python?
An important  issue in my view - is something unexpected to new ZPT 
users:  superior design patterns - especially if you take advantage of 
Macros and Slots.


If you are mid developement i wouldnt suggest making the change now.  
But I do suggest you consider using ZPT when you can - maybe with 
simpler modules at first. 

BTW this very same dispute came up a few months ago and you might google 
for it.


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 )