Hi, I'm experimenting with products an I'm finding challenging to serve a javascript file from the context of the product. I've simply defined a function def posts_js(self): """javascript file""" return DTMLFile('dtml/posts.js', globals()) The file is served but some chars are substituted by entity, so if I have if (i < 10) { I get if (i < 10) { and the browser dislike it... I need something like 'structure' of ZPTs, but I don't know how to use it from products, and however I suspect it could be useless cause the function return an object (am I right?). thanks for any hint massimo
massimop@users.berlios.de wrote at 2004-12-11 15:59 +0100:
I'm experimenting with products an I'm finding challenging to serve a javascript file from the context of the product.
I've simply defined a function
def posts_js(self): """javascript file""" return DTMLFile('dtml/posts.js', globals())
Try: posrt_js = DTMLFile(...) -- Dieter
I am interested in two or more zopes talking to each other, particularly to lookup data and display results on the other or to send data from one to the other - so client and server. Not simple syndication from one to the other but real two way communication. I am thinking of using XML RPC because I am not sure on whether SOAP can work properly on zope from basic material I have read thus far. What is most practical for production sites? Anyone have experience using zope as a client and server in this way? I am also particularly interested in any recommendations for handling authentication and encryption in such a case. Regards, David
xmlrpc and http are the protocols that are supported out-of-the-box. -aj --On Sonntag, 12. Dezember 2004 22:29 Uhr -0400 David Pratt <fairwinds@eastlink.ca> wrote:
I am interested in two or more zopes talking to each other, particularly to lookup data and display results on the other or to send data from one to the other - so client and server. Not simple syndication from one to the other but real two way communication. I am thinking of using XML RPC because I am not sure on whether SOAP can work properly on zope from basic material I have read thus far. What is most practical for production sites? Anyone have experience using zope as a client and server in this way? I am also particularly interested in any recommendations for handling authentication and encryption in such a case.
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 )
I had put together some code in the past would do things through the zmi with calls via https passing the user password. More to the point, it occurred to me that I ought to be doing this via xmlrpc or even SOAP. It opens up other possibilities besides the browser as well. The key is doing it securely. I realize Zope is a xmlrpc server out of the box but I wanted to make it work as a secure client as well since I want to communicate with other zope instances. Python's xmlrpclib does not support basic authentication over https. I guess it boiled down to tracking down a resource that could do this. This morning I found what I was after - a class from ZSyncer that works just fine. :-) Regards, David On Monday, December 13, 2004, at 12:19 AM, Andreas Jung wrote:
xmlrpc and http are the protocols that are supported out-of-the-box.
-aj
--On Sonntag, 12. Dezember 2004 22:29 Uhr -0400 David Pratt <fairwinds@eastlink.ca> wrote:
I am interested in two or more zopes talking to each other, particularly to lookup data and display results on the other or to send data from one to the other - so client and server. Not simple syndication from one to the other but real two way communication. I am thinking of using XML RPC because I am not sure on whether SOAP can work properly on zope from basic material I have read thus far. What is most practical for production sites? Anyone have experience using zope as a client and server in this way? I am also particularly interested in any recommendations for handling authentication and encryption in such a case.
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 )
Il giorno lun, 13-12-2004 alle 00:09 +0100, Dieter Maurer ha scritto:
massimop@users.berlios.de wrote at 2004-12-11 15:59 +0100:
I'm experimenting with products an I'm finding challenging to serve a javascript file from the context of the product.
I've simply defined a function
def posts_js(self): """javascript file""" return DTMLFile('dtml/posts.js', globals())
Try:
posrt_js = DTMLFile(...)
Perfect! Thanks a lot massimo
participants (4)
-
Andreas Jung -
David Pratt -
Dieter Maurer -
massimop@users.berlios.de