Re: [Zope] Periodic task in a Zope 2 environment

2009-02-17 Thread Chris Withers
Marco Bizzarri wrote:
 Is there a better way to run such tasks in Zope 2 environments?

Have a look at Stepper:

http://www.simplistix.co.uk/software/zope/stepper

...and then actually *use* cron to trigger stepper ;-)

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] Periodic task in a Zope 2 environment

2009-02-17 Thread Chris Withers
Thibaud Morel l'Horset wrote:
 What I did to solve this problem is simply create a few crons on the 
 server that each do a mechanize 
 (http://wwwsearch.sourceforge.net/mechanize/) http call to a specific 
 location in Zope which basically acts as a private API: when called, it 
 executes a function that triggers whatever needs to happen. I hard-coded 
 a check that the source IP must be the specific internal address of the 
 server Zope runs on. That way I know that the functions can't be called 
 from the outside.

This is all extremely fragile and generally not a good idea.

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] Periodic task in a Zope 2 environment

2009-02-17 Thread Marco Bizzarri
On Tue, Feb 17, 2009 at 6:48 PM, Chris Withers ch...@simplistix.co.uk wrote:
 Marco Bizzarri wrote:

 Is there a better way to run such tasks in Zope 2 environments?

 Have a look at Stepper:

 http://www.simplistix.co.uk/software/zope/stepper

 ...and then actually *use* cron to trigger stepper ;-)

 Chris

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



Thanks, Chris, but I do not want to use cron... also because I can end
in environments where there is no cron ;)


-- 
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.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] Zope2 and XMLRPC methods

2009-02-17 Thread Rowan Woodhouse
Hi,

I'm having some trouble getting XML-RPC methods going on Zope2/Five. 
I've got the following in my configure.zcml:

configure
 xmlns=http://namespaces.zope.org/zope;
 xmlns:browser=http://namespaces.zope.org/browser;
 xmlns:five=http://namespaces.zope.org/five;
 xmlns:xmlrpc=http://namespaces.zope.org/xmlrpc;

 include package=zope.app.publisher.xmlrpc file=meta.zcml /
 include package=zope.app.security file=meta.zcml /

 xmlrpc:view
 for=MZCore.interface.IMZTag
 methods=smeg
 class=MZCore.MZTag.MZTag.MZTagXmlRpcInterface
 permission=zope.Public
 /

/configure


and MZTag.py has the following in it:


from zope.app.publisher.xmlrpc import XMLRPCView

class MZTagXmlRpcInterface(XMLRPCView):

 def smeg(self):
 something
 
 return 'hello!'


But when I try to access the method via XML-RPC as follows (where aaa is 
and object that implements IMZTag)

  s = ServerProxy('http://admin:ad...@192.168.69.135:9673/aaa')
  s.smeg()

I get an error back saying Cannot locate object at: 
http://192.168.69.135:9673/aaa/smeg;

I'm at a loss now as what to try next. If I change the method name in 
either the configure.zcml or python files I get an error back saying 
that the method cannot be found when the .zcml file is parsed so I know 
it is being included.

Does anyone have any ideas?

Thanks,
Rowan

___
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] Zope2 and XMLRPC methods

2009-02-17 Thread Bill Campbell
On Tue, Feb 17, 2009, Rowan Woodhouse wrote:
Hi,

I'm having some trouble getting XML-RPC methods going on Zope2/Five. 
I've got the following in my configure.zcml:

configure
 xmlns=http://namespaces.zope.org/zope;
 xmlns:browser=http://namespaces.zope.org/browser;
 xmlns:five=http://namespaces.zope.org/five;
 xmlns:xmlrpc=http://namespaces.zope.org/xmlrpc;

 include package=zope.app.publisher.xmlrpc file=meta.zcml /
 include package=zope.app.security file=meta.zcml /

 xmlrpc:view
 for=MZCore.interface.IMZTag
 methods=smeg
 class=MZCore.MZTag.MZTag.MZTagXmlRpcInterface
 permission=zope.Public
 /

/configure

...
But when I try to access the method via XML-RPC as follows (where aaa is 
and object that implements IMZTag)

I am probably using an older version of zope, but the following
is working for me using xmlrpclib.

from xmlrpclib import ServerProxy
baseurl = 'http://username:passw...@host.example.com:8080/'
server = ServerProxy(baseurl + 'some/path')
results = server.myFunction() # arguments as necessary

Perhaps this is too simple, but it Just Works(tm).

Bill
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

Force always attracts men of low morality.  -- Albert Einstein
___
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] Zope2 and XMLRPC methods

2009-02-17 Thread Rowan Woodhouse
Bill Campbell wrote:
 On Tue, Feb 17, 2009, Rowan Woodhouse wrote:
 Hi,

 I'm having some trouble getting XML-RPC methods going on Zope2/Five. 
 I've got the following in my configure.zcml:

 configure
 xmlns=http://namespaces.zope.org/zope;
 xmlns:browser=http://namespaces.zope.org/browser;
 xmlns:five=http://namespaces.zope.org/five;
 xmlns:xmlrpc=http://namespaces.zope.org/xmlrpc;

 include package=zope.app.publisher.xmlrpc file=meta.zcml /
 include package=zope.app.security file=meta.zcml /

 xmlrpc:view
 for=MZCore.interface.IMZTag
 methods=smeg
 class=MZCore.MZTag.MZTag.MZTagXmlRpcInterface
 permission=zope.Public
 /

 /configure

 ...
 But when I try to access the method via XML-RPC as follows (where aaa is 
 and object that implements IMZTag)
 
 I am probably using an older version of zope, but the following
 is working for me using xmlrpclib.
 
 from xmlrpclib import ServerProxy
 baseurl = 'http://username:passw...@host.example.com:8080/'
 server = ServerProxy(baseurl + 'some/path')
 results = server.myFunction() # arguments as necessary
 
 Perhaps this is too simple, but it Just Works(tm).
 
 Bill

Thanks for the suggestion but that is what I'm doing at the moment when 
trying to access the method. I can access methods published through a 
Plone page on the same server instance without any problems.

The problem seems to be that the XML-RPC method isn't being published or 
bound to the IMZTag interface for some reason.

Rowan

___
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] Stored Procedures Versus ZSQL Methods

2009-02-17 Thread Remy Pinsonnault
Hello,
We have a Zope application with thousands of Z SQL methods connected to an
Oracle Database.

Our DBA want us to develop our new applications using stored procedures
called through external methods, instead of using directly Z SQL methods,
for performance issues and memory usage.

Do stored procedures will allow better performance?

Thanks in advance

Rémy
___
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-dev] SVN: zope2book/trunk/ Lot's of updates over the weekend!

2009-02-17 Thread Tino Wildenhain

Dieter Maurer wrote:

Tres Seaver wrote at 2009-2-15 10:45 -0500:

...
At the moment, the book is largely a guide to what can be done with Zope
TTW.  DTML is still part of that store: it isn't gone, nor even
deprecated:  its just that most core developers prefer not to use it in
most cases.  Note that there is still no replacement for DTML for at
least one major TTW use case (SQL methods).


In addition, CSS and Javascript is easier generated with DTML than
with page templates.


You should really not generate CSS ;) And JS is best generated with
Jason :-)

Regards
Tino


smime.p7s
Description: S/MIME Cryptographic Signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] SVN: zope2book/trunk/ Lot's of updates over the weekend!

2009-02-17 Thread Wichert Akkerman
Previously Martijn Pieters wrote:
 On Tue, Feb 17, 2009 at 12:08, Tino Wildenhain t...@wildenhain.de wrote:
  You should really not generate CSS ;) And JS is best generated with
  Jason :-)
 
 You need to generate CSS when you want to use absolute paths for
 images referred to in your CSS. This can easily be done with ZPT:

Very often you don't need to do that though, and it actively breaks the
ability to do prototyping with your html and css outside of the
application.

Wichert.

-- 
Wichert Akkerman wich...@wiggy.netIt is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 7 OK, 1 Failed

2009-02-17 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Mon Feb 16 12:00:00 2009 UTC to Tue Feb 17 12:00:00 2009 UTC.
There were 8 messages: 8 from Zope Tests.


Test failures
-

Subject: FAILED (failures=1) : Zope-trunk-alltests Python-2.5.4 : Linux
From: Zope Tests
Date: Mon Feb 16 20:57:28 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011128.html


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.7 : Linux
From: Zope Tests
Date: Mon Feb 16 20:43:25 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011121.html

Subject: OK : Zope-2.9 Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Feb 16 20:45:26 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011122.html

Subject: OK : Zope-2.10 Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Feb 16 20:47:26 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011123.html

Subject: OK : Zope-2.11 Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Feb 16 20:49:26 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011124.html

Subject: OK : Zope-trunk Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Feb 16 20:51:27 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011125.html

Subject: OK : Zope-trunk Python-2.5.4 : Linux
From: Zope Tests
Date: Mon Feb 16 20:53:28 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011126.html

Subject: OK : Zope-trunk-alltests Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Feb 16 20:55:28 EST 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-February/011127.html

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


Re: [Zope-dev] SVN: zope2book/trunk/ Lot's of updates over the weekend!

2009-02-17 Thread Stephan Richter
On Tuesday 17 February 2009, Wichert Akkerman wrote:
  You need to generate CSS when you want to use absolute paths for
  images referred to in your CSS. This can easily be done with ZPT:

 Very often you don't need to do that though, and it actively breaks the
 ability to do prototyping with your html and css outside of the
 application.

You could also port z3c.zrtresource to Zope 2, which solves this exact 
problem.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. Zope Stephan Richter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Single Sign On

2009-02-17 Thread Shane Hathaway
I'm working with a customer on a single sign on (SSO) system for Zope. 
We haven't yet chosen which SSO system we want to use.  I would like to 
hear from anyone who has set up SSO with Zope.

We have some definite requirements:

* We can't accept arbitrary identities like OpenID normally does.  We 
need to set up our own identity provider (IDP) and force our servers to 
accept only identities provided by our own IDP.

* The SSO process should be very similar to an ordinary cookie-based 
login process.  I don't want the user to have to enter their username on 
one form and their password on another, but that's the standard OpenID 
process.

* This will be implemented in Zope 3.

We are considering OpenID, Shibboleth, CAS, and any other mature system 
that others might suggest.  Shibboleth seems like the most obvious fit, 
but it's nowhere near as popular as OpenID.  I haven't yet looked at CAS 
in detail.

Alternatively, I have wondered if we actually need full-blown SSO; 
perhaps a carefully constructed domain-wide cookie would do the trick. 
Any experiences with that?

Thanks to anyone who participates.

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


Re: [Zope-dev] SVN: zope2book/trunk/ Lot's of updates over the weekend!

2009-02-17 Thread Simon Michael
Tres Seaver wrote:
 I think it is too premature to be moving the DTML chapters out of the
 book:  if we arent just updating the book to be current with 2.12, then
 we probably need to discuss what kind of book we want, before chopping
 it apart.

and

 I would rather make the case, explaining the tradeoffs, including the
 fact that the consensus of the community is as you express, but then let
 people make up their own minds.

+1 to both.

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


[Zope-DB] Stored Procedures Versus ZSQL Methods

2009-02-17 Thread Remy Pinsonnault
Hello,
We have a Zope application with thousands of Z SQL methods connected to an
Oracle Database.

Our DBA want us to develop our new applications using stored procedures
called through external methods, instead of using directly Z SQL methods,
for performance issues and memory usage.

Do stored procedures will allow better performance?

Thanks in advance

Rémy
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods

2009-02-17 Thread JPenny
Yes, with a stored procedure the DB does not have to reparse and
prepare a new plan for every query.  This can be a major win.  Esp. 
on Oracle.





Remy Pinsonnault remypinsonna...@gmail.com 
Sent by: zope-boun...@zope.org
02/17/2009 06:37 PM

To
zope-db@zope.org, z...@zope.org
cc

Subject
[Zope] Stored Procedures Versus ZSQL Methods






Hello,

We have a Zope application with thousands of Z SQL methods connected to an 
Oracle Database.

Our DBA want us to develop our new applications using stored procedures 
called through external methods, instead of using directly Z SQL methods, 
for performance issues and memory usage.

Do stored procedures will allow better performance?

Thanks in advance

Rémy___
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 )


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods

2009-02-17 Thread JPenny
No, ZSQL really predates bind variables.  That is, they we
available on a few systems, but were rare.  If the Oracle 
specialist has a reason for going to external methods, like
his server is seriously loaded, I would pay attention to him.
If he is just following some set of best practices, well, that
is a political problem for Remy.

Using external methods will be more work for the zope writer. 
I don't know enough to comment seriously on security issues, 
but I think that using procedures, like using bind variables, will 
make  SQL Injection much harder.





Cynthia Kiser cnk+z...@caltech.edu 
02/17/2009 06:44 PM

To
jpe...@ykksnap-america.com
cc
Remy Pinsonnault remypinsonna...@gmail.com, zope-db@zope.org
Subject
Re: [Zope-DB] [Zope] Stored Procedures Versus ZSQL Methods






Quoting jpe...@ykksnap-america.com jpe...@ykksnap-america.com:
 Yes, with a stored procedure the DB does not have to reparse and
 prepare a new plan for every query.  This can be a major win.  Esp. 
 on Oracle.

Does ZSQL allow the use of bind variables? If so and the database has
a correctly sized query cache, there shouldn't be much reparsing for
repeated queries. 


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db