Re: [Zope] Zope Digest, Vol 127, Issue 3
Thanks both. .body() is the simple answer, .read() also works. Rich Message: 1 Date: Wed, 13 May 2015 11:36:03 + From: Rich Harley raharl...@gmail.com To: zope@zope.org Subject: [Zope] Iterating over objects in ZODB Message-ID: 86a3fe9b-5060-4d9a-b5ba-7f96aacd7...@gmail.com Content-Type: text/plain; charset=windows-1252 When iterating over dtml objects, the contents of those scripts can be returned: e.g. for item in context.objectValues(): if item.meta_type=='DTML Method?: print item But when iterating over Python Scripts, only: PythonScript at handleday is returned. How can I access the actual contents of the Python Script? Thanks Rich -- Message: 2 Date: Wed, 13 May 2015 13:57:30 +0200 From: Niels Dettenbach n...@syndicat.com To: zope@zope.org Subject: Re: [Zope] Iterating over objects in ZODB Message-ID: 2201822.Nhz8cIhMP1@gongo Content-Type: text/plain; charset=us-ascii Am Mittwoch, 13. Mai 2015, 11:36:03 schrieb Rich Harley: is returned. How can I access the actual contents of the Python Script? The python script object seems a bit more complex then a DTML-Method object - means you have to access the script content of the python script object directly (not shure if it's params and body - have to look into Zope help (PythonScript.py) or Zope sources for the exact field). regarduing the object docs it shoudl work with .read() directly (if it IS a PythonScript object) or document_src: def read(): Return the body of the Python Script, with a special comment block prepended. This block contains meta-data in the form of comment lines as expected by the 'write' method. def document_src(REQUEST=None, RESPONSE=None): Return the text of the 'read' method, with content type 'text/plain' set on the RESPONSE. hth a bit and works, Niels. -- --- Niels Dettenbach Syndicat IT Internet http://www.syndicat.com PGP: https://syndicat.com/pub_key.asc --- -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part. URL: http://mail.zope.org/pipermail/zope/attachments/20150513/3755648d/attachment-0001.sig -- Message: 3 Date: Wed, 13 May 2015 12:02:12 GMT From: Fernando ferna...@cmartins.nl To: Niels Dettenbach n...@syndicat.com Cc: zope@zope.org Subject: Re: [Zope] Iterating over objects in ZODB Message-ID: 1431518532918.105147.15916@webmail6 Content-Type: text/plain; charset=utf-8 obj.body() On 13 May 2015, Niels Dettenbach n...@syndicat.com wrote: Am Mittwoch, 13. Mai 2015, 11:36:03 schrieb Rich Harley: is returned. How can I access the actual contents of the Python Script? The python script object seems a bit more complex then a DTML-Method object - means you have to access the script content of the python script object directly (not shure if it's params and body - have to look into Zope help (PythonScript.py) or Zope sources for the exact field). regarduing the object docs it shoudl work with .read() directly (if it IS a PythonScript object) or document_src: def read(): Return the body of the Python Script, with a special comment block prepended. This block contains meta-data in the form of comment lines as expected by the 'write' method. def document_src(REQUEST=None, RESPONSE=None): Return the text of the 'read' method, with content type 'text/plain' set on the RESPONSE. hth a bit and works, Niels. -- --- Niels Dettenbach Syndicat IT Internet http://www.syndicat.com PGP: https://syndicat.com/pub_key.asc --- ___ 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 ) -- next part -- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope/attachments/20150513/d49b91d5/attachment-0001.html -- Subject: Digest Footer ___ Zope maillist - Zope@zope.org -- End of Zope Digest, Vol 127, Issue 3 ___ 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] Iterating over objects in ZODB
When iterating over dtml objects, the contents of those scripts can be returned: e.g. for item in context.objectValues(): if item.meta_type=='DTML Method’: print item But when iterating over Python Scripts, only: PythonScript at handleday is returned. How can I access the actual contents of the Python Script? Thanks Rich ___ 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] Zope.org fading away ..
It might be better if the whole zope project is handed over to somebody willing to move it forward. It’s pretty obvious the various parts that make up the community like mailing lists, website, forums etc have been dead or dying for a long time. Will Zope ever get back to 2005-2006 levels…? See : http://www.google.com/trends/explore#q=zope Rich On 11 Mar 2014, at 23:07, Sean Upton sdup...@gmail.com wrote: On Tue, Mar 11, 2014 at 3:12 PM, Tres Seaver tsea...@palladion.com wrote: When I try to visit the mailing list web interface, Firefox is stopped in its tracks by Secure Connection Failed An error occurred during a connection to mail.zope.org. The OCSP server has no status for the certificate. (Error code: sec_error_ocsp_unknown_cert) There are two problems with HTTPS on mail.zope.org: our own certificate is expired, and the issuer (StartCom) has an intermediate certificate which expired even longer ago: http://www.sslshopper.com/ssl-checker.html#hostname=mail.zope.org/ I hope there is some luck folks having with resolving this. One can always take the approach Jim took with ZODB-dev, moving it to Google Groups, but there is real value in the archives regardless of where the current lists live. And the archives are de-facto inaccessible now -- if nothing else, the archives could be hosted on any static HTTP site and would not need any SSL/TLS/certificate burden. Sean ___ 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] Zope.org fading away ..
On 12 Mar 2014, at 10:05, zopyxfil...@gmail.com wrote: Rich Harley wrote: It might be better if the whole zope project is handed over to somebody willing to move it forward. The whole Zope project is as open as an open-source project can be. It’s not that Zope isn’t as open source as it can be, it’s that anyone building a new application will not use Zope, which is clearly a problem for longevity since in another 3 years there will be even less people using Zope as more and more legacy applications get rewritten. Personally we are very embedded with Zope 2.11. It’s excellent for what we are using it for and we are incredibly grateful of the community that built that product over the last 10 years. We use Zope in a very simple way for just holding python code, handling roles and connecting out to a Postgres DB but there are other frameworks which would do the same thing in a leaner way now. Still, we are not looking to rewrite because it does what we need well, although the version control is more hassle than it should be. What is the problem here? The problem is how to attract new developers to rebuild a Zope fit for life from 2015+. That would mean making the framework more modern in every sense but still retaining the features that made Zope great in the past like excellent security handling and a quick development cycle. This is not an easy task and would probably involve some rebranding as the Zope name is now associated with an old framework. The decade of the large application servers and frameworks is over. Possibly but Zope could have moved with the times and evolved with the momentum it had 5 years ago instead of being usurped by frameworks like Django and Turbogears which any python dev would choose over Zope in a heartbeat these days if they wanted to build a scalable application. This is what needs to be addressed - or is it your opinion that Zope will die and there’s nothing we can do about it? That seems a shame to me. Rich It’s pretty obvious the various parts that make up the community like mailing lists, website, forums etc have been dead or dying for a long time. Will Zope ever get back to 2005-2006 levels…? See : http://www.google.com/trends/explore#q=zope -aj ___ 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] Zope.org fading away ..
On 12 Mar 2014, at 11:08, zopyxfil...@gmail.com wrote: Rich Harley wrote: On 12 Mar 2014, at 10:05, zopyxfil...@gmail.com wrote: Rich Harley wrote: It might be better if the whole zope project is handed over to somebody willing to move it forward. The whole Zope project is as open as an open-source project can be. It’s not that Zope isn’t as open source as it can be, Why? I am not disputing Zope is/was a great open source project. The problem is how to attract new developers to rebuild a Zope fit for life from 2015+. That would mean making the framework more modern in every sense but still retaining the features that made Zope great in the past like excellent security handling and a quick development cycle. This is not an easy task and would probably involve some rebranding as the Zope name is now associated with an old framework. The decade of the large application servers and frameworks is over. Possibly but Zope could have moved with the times and evolved with the momentum it had 5 years ago instead of being usurped by frameworks like Django and Turbogears which any python dev would choose over Zope in a heartbeat these days if they wanted to build a scalable application. This is what needs to be addressed - or is it your opinion that Zope will die and there’s nothing we can do about it? That seems a shame to me. Zope lives as long as someone uses it (Plone uses it). Plone is going the same way of declining usage and development over the last 3-5 years. Apart from that: the project live from the contributions and contributors. The Zope world is kind of a legacy and it is unlikely at this will change. Keep it alive somehow to the point as you need by taking over responsibility. Do you step up for a particular task? Good response:) No I don’t step up right now, too busy with our own codebase. But we would love to take the project forward in the future when we are a bigger company. Is the Zope 4 project still alive that was talked about in 2011? Andreas ___ 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] Zope.org fading away ..
You were misunderstanding me, I am not claiming that. I said It’s not that Zope isn’t as open source as it can be, it’s that anyone building a new application will not use Zope” I am saying there is nothing wrong with the open sourceness of Zope. That wasn’t very clear, apologies. My concerns are solely around Zope moving forward over the next few years and how we can best achieve a community feel around Zope - or a deviate of Zope -once again. Rich On 12 Mar 2014, at 11:43, zopyxfil...@gmail.com wrote: Rich Harley wrote: On 12 Mar 2014, at 11:08, zopyxfil...@gmail.com wrote: Rich Harley wrote: On 12 Mar 2014, at 10:05, zopyxfil...@gmail.com wrote: Rich Harley wrote: It might be better if the whole zope project is handed over to somebody willing to move it forward. The whole Zope project is as open as an open-source project can be. It’s not that Zope isn’t as open source as it can be, Why? I am not disputing Zope is/was a great open source project. Why do you claim that Zope is not as open as it can be? What is missing? Where is Zope not open? Please be specific. -aj ___ 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-DB] Checkboxes selecting records...
Hi all Not sure if I'm on the right lines with what I'm trying to do below. I have a list of records that come from a database select query (dtml-in horses). Next to each record is a check box. I want to be able to select the checkbox of x number of records, submit the form and see just those records, minus the ones I didn't check. This will be the confirm page. When I have confirmed my selections, the said records should then be stored on a page so I can view them later, like a permanent select query I suppose that I can view at any time. For each time I select and confirm some records, a new page, with those records on, should be created. Am I correct in guessing I have to use the id as the identifier? I've got as far as passing the results of the checkbox form onto onto the confirm page - but only displaying 1,2,3 etc or whichever ones I check. How can I get records with id 1,2,3 out of the database table? Then can those records be saved onto a html page for use later? I'm using mysql, if that makes any difference. Sorry for all the (probably simple) questions! Thanks in advance. Rich ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
[Zope] Re: live dtml updating?
On Sunday 11 December 2005 22:30, you wrote: Hi all Sorry if this is not a specific zope question but I'm confident someone will be able to help me with the following. I have an input form on a webpage and below it a table which pulls out of a database. The column headers in the table relate to the input form in that I want whatever the user types into the input box for the correct column to be highlighted in bold. So say, for example I had two columns A and B I want column B to be highlighted bold when the user types 'b' into the input box at the top. How can I do this? Rich -- www.horsey.tk ___ 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 )