Hi, (It is not my intent to cross post but I sent this to the Formulator list yesterday and still haven't seen it show up.) I'm pretty new to Zope so please speak slowly and use small words. :o) Several months ago I started a small learning project in Zope using Formulator. I got to the point of successfully creating data input forms, storing the entered data in ZODB objects, cataloging the objects, and using the catalog to retrieve and display data from an object. Life intruded and forced me to lay the project aside for a couple months but now I'm ready to pick it back up. I'm hoping someone can help kickstart me into the next step which is providing a data edit form to let the user change previously stored data. Currently, to show previously saved data, I give the user a drop-down box with all the record keys, let them select a key and click Submit, then use a Python script to query the catalog and print/return the selected fields (property values) to a display page. What I'd like to do is return the selected fields into the input form so the user can edit them. Here is the ZPT code (taken from a forgotten example) used to display the original input form. <form name="dataform" method="post" action="formresult.zpt"> <!-- This starts the table that displays all fields on the form ---> <table tal:define="form here/dataform" align=left> <!-- Loop through the Formulator field ids to get the form fields ---> <tr tal:repeat="itemz here/dataform/get_field_ids"> <!-- Using span to define a block definition to hold a form field object ---> <span tal:define="fieldobj python:form.get_field(id=itemz)"> <th align="left"> <font size=4> <font face="verdana"> <!-- Get/Display the title property of the current input field ---> <b tal:content="fieldobj/title">Field Display Label</b> <b>:</b> </font> </font> </th> <td> <!-- Use Formulator render command to create the field data input box ---> <input type="text" name="itemz" tal:replace="structure python:fieldobj.render()"> </td> </span> </tr> <!-- Tack on a Submit button and we are done ---> <tr cols="*,350,*"> <td> </td> <td align=left><input type="submit" value=" Submit "></td> <td> </td> </tr> </table><br> </form> Could someone please explain how to get the fields retrieved by my Python script into the form so the user can change them? Thanks, Tom P. Allred, MCSE, RHCE, CCNA Allred Data Consulting, Inc. 888-381-0611 www.AllredData.com Tom@AllredData.com
Hello all I am trying to make an Application using external Python code and ZPT. In the examples I have, DTML is used and those files are read using HTMLFile() or DTMLFile(). What is the appropriate method for reading ZPTs? BTW Where can I find the API documenation for looking this up? I could not find anything on the Zope web site. Any help is appreciated, thanks Andre
Check out the latest JMBoring product. It will answer that question and more. http://zope.org/Members/jmeile/JMBoring Cheers, Mike
Hello all
I am trying to make an Application using external Python code and ZPT. In the examples I have, DTML is used and those files are read using HTMLFile() or DTMLFile(). What is the appropriate method for reading ZPTs?
BTW Where can I find the API documenation for looking this up? I could not find anything on the Zope web site.
Any help is appreciated, thanks Andre
_______________________________________________ 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 )
Andre Meyer wrote at 2003-11-10 16:54 +0100:
I am trying to make an Application using external Python code and ZPT. In the examples I have, DTML is used and those files are read using HTMLFile() or DTMLFile(). What is the appropriate method for reading ZPTs?
"Products.PageTemplates.PageTemplateFile.PageTemplateFile".
BTW Where can I find the API documenation for looking this up? I could not find anything on the Zope web site.
In this specific case, I would have been a good idea to look into the package implementing page template (i.e. "Products/PageTemplates"). -- Dieter
Dear Dieter
In this specific case, I would have been a good idea to look into the package implementing page template (i.e. "Products/PageTemplates").
As a year-long Java programmer I was searching the Zope web site for the Zope API, but could not find it. Is there something like the Javadoc API for Python/Zope? That would help me a lot and avoid asking such questions... Or is it necessary to inspect the source code? There is a docstring in each Python class for generating documentation, though. Or what can I do with the help files (*.stx) in the Products folder? Can you give me a link or a hint, please? Sorry if thiese questions sound stupid to you. I guess I need to learn a new way of developing using Python rather than Java or other compiled languages. thanks a lot for your help André ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Andre Meyer" <a.meyer@hccnet.nl> Cc: <zope@zope.org> Sent: Monday, November 10, 2003 8:23 PM Subject: Re: [Zope] ZPT file reader
Andre Meyer wrote at 2003-11-10 16:54 +0100:
I am trying to make an Application using external Python code and ZPT. In the examples I have, DTML is used and those files are read using HTMLFile() or DTMLFile(). What is the appropriate method for reading ZPTs?
"Products.PageTemplates.PageTemplateFile.PageTemplateFile".
BTW Where can I find the API documenation for looking this up? I could not find anything on the Zope web site.
In this specific case, I would have been a good idea to look into the package implementing page template (i.e. "Products/PageTemplates").
-- Dieter
--On Dienstag, 11. November 2003 9:17 Uhr +0100 Andre Meyer <a.meyer@hccnet.nl> wrote:
As a year-long Java programmer I was searching the Zope web site for the Zope API, but could not find it. Is there something like the Javadoc API for Python/Zope? That would help me a lot and avoid asking such questions... Or is it necessary to inspect the source code? There is a docstring in each Python class for generating documentation, though. Or what can I do with the help files (*.stx) in the Products folder? Can you give me a link or a hint, please?
Zope API References? Dieters DocFinder? Sources? -aj
Please take a look at The Zope Book (2_6 Edition). The Appendices contain the API for Zope. The book itself contains a wealth of infomration. The help files are another useful source of information. When all else fails, read the code. On Tue, 11 Nov 2003, Andreas Jung wrote:
--On Dienstag, 11. November 2003 9:17 Uhr +0100 Andre Meyer <a.meyer@hccnet.nl> wrote:
As a year-long Java programmer I was searching the Zope web site for the Zope API, but could not find it. Is there something like the Javadoc API for Python/Zope? That would help me a lot and avoid asking such questions... Or is it necessary to inspect the source code? There is a docstring in each Python class for generating documentation, though. Or what can I do with the help files (*.stx) in the Products folder? Can you give me a link or a hint, please?
Zope API References? Dieters DocFinder? Sources?
-aj
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Hooray, here is what I was looking for: http://www.last-bastion.net/Zpydoc/Zpydoc It comes close to what I use for Java (http://java.sun.com/j2se/1.4.2/docs/api/) and should be on the zope.org web site, imho. Maybe some more work on formatting and examples could be useful. If nobody else is using this, what is your preference? For example, I still cannot find documentation on Products.PageTemplates.PageTemplateFile.PageTemplateFile anywhere on the zope.org web site or in the help system. http://www.last-bastion.net/Zpydoc/Zpydoc/Products.PageTemplates.html helps, but first you need to know what you are looking for ;-) Thanks for all your support Andre
We have 2 public zopes and one admin zope on a ZEO...all on the same Linux box. We have squid in front and POUND in front of that. Would like to monitor the sites and inform us when down....really down, not just when Webmin can't talk to one of them or they are restarting themselves. Has anyone had success with remote monitoring services? Or luck with specific tools or utilities in Linux for monitoring? Our Zopes go up and down...sometimes the 'site' stays 'running' (or thinks its running) but the backend servers are down and do not restart themselves. I googled for a few links but wondered if anyone had specific successes. thanks Allen
Would like to monitor the sites and inform us when down....really down, not just when Webmin can't talk to one of them or they are restarting themselves.
Has anyone had success with remote monitoring services? Or luck with specific tools or utilities in Linux for monitoring?
Nagios can do this. It tells you when Zope (a certain port) hasn't answered for a specific number of seconds. It also tells you when it goes alive. http://www.nagios.org Tim
On Tue, Nov 11, 2003 at 12:40:45AM -0800, Dennis Allison wrote:
Please take a look at The Zope Book (2_6 Edition). The Appendices contain the API for Zope. The book itself contains a wealth of infomration. The help files are another useful source of information. When all else fails, read the code.
The Zope API Reference, useful as it is, is far from complete. For example, it does not answer the O.P.'s question. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's DONT LOOK AT THAT SUPERCALIFRAGILISTICEXPIALADOCIOUS PANTS TEACHER! (random hero from isometric.spaceninja.com)
--On Dienstag, 11. November 2003 10:24 Uhr -0500 Paul Winkler <pw_lists@slinkp.com> wrote:
On Tue, Nov 11, 2003 at 12:40:45AM -0800, Dennis Allison wrote:
Please take a look at The Zope Book (2_6 Edition). The Appendices contain the API for Zope. The book itself contains a wealth of infomration. The help files are another useful source of information. When all else fails, read the code.
The Zope API Reference, useful as it is, is far from complete. For example, it does not answer the O.P.'s question.
This raises my old question: why aren't there people in the community willing to contribute to the documentation? Other projects have less problems in producing a reasonable up-2-date documentation. It is only a problem of the Zope community? I really don't understand this... -aj
On Tue, Nov 11, 2003 at 04:40:08PM +0100, Andreas Jung wrote:
--On Dienstag, 11. November 2003 10:24 Uhr -0500 Paul Winkler <pw_lists@slinkp.com> wrote:
On Tue, Nov 11, 2003 at 12:40:45AM -0800, Dennis Allison wrote:
Please take a look at The Zope Book (2_6 Edition). The Appendices contain the API for Zope. The book itself contains a wealth of infomration. The help files are another useful source of information. When all else fails, read the code.
The Zope API Reference, useful as it is, is far from complete. For example, it does not answer the O.P.'s question.
This raises my old question: why aren't there people in the community willing to contribute to the documentation? Other projects have less problems in producing a reasonable up-2-date documentation. It is only a problem of the Zope community? I really don't understand this...
We talked a bit about the API reference during the 2.6 Zope Book process. As I recall, the problems were partly logistical. the Zope Book has embedded comments, and we don't want to lose those. On the other hand, the API reference was IIRC originally generated from the Help system. So there's an impedance mismatch there. You don't want to make a change in the API reference without making the same change in the embedded docs; this requires developer access to the Zope sources. These problems are surely not insoluble, but nobody's had the time and/or drive to deal with it. Furthermore, it's rather odd that the embedded docs are only semi-embedded. What I mean is, they are not pulled from docstrings of the actual classes, but from separate files in the help/ directories scattered around the zope source tree, which can get out of sync with the real code. I guess this was done to allow developers a bit more leeway in what they do with their docstrings? Or to avoid cluttering up the API reference with stuff that is meant to be purely internal? But it leads to weird historical cruft like ObjectManagerItem (my favorite API reference gripe), an imaginary class that exists only in the docs. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's PREDOMINANT SPAZ! (random hero from isometric.spaceninja.com)
My impression as a recent programmer with Zope is that it would be very important to work on improved documentation. Even with a lot of experience in programming using Zope is quite confusing as a result of the wealth of options for using it (DTML vs. ZPT, external code vs. ZClasses, ZODB vs. MySQL, etc.) and the lack of good comprehensive examples. Most vital information can be obtained via the mailing list. Sorry for the newbie questions, but I could not find answers to my questions elsewhere. Now, the question remains wrt. how to motivate the community to improve the situation. My experience is that this must be based on a good doc generation tool and documentation standards. There are PyDoc and the docstrings, so there should be used consistently and extensively, imho. comments are welcome Andre
Andre Meyer wrote at 2003-11-11 18:11 +0100:
... There are PyDoc and the docstrings, so there should be used consistently and extensively, imho.
"DocStrings" are used quite well (not optimal, I agree, but not too bad either). "DocFinder" uses these "DocStrings" and other information available through Python's inspection facilities to present you documentation for any Zope object. <http://www.dieter.handshake.de/pyprojects/zope> On the same page, you find patches for Zope and "pydoc" to let "pydoc" work with Zope. The patches are quite old. They may no longer work with modern Zope versions (as you see, I do not use it). Recently, someone else found "Zdoc" useful. -- Dieter
On Tue, 2003-11-11 at 07:40, Andreas Jung wrote:
The Zope API Reference, useful as it is, is far from complete. For example, it does not answer the O.P.'s question.
This raises my old question: why aren't there people in the community willing to contribute to the documentation?
Our documentation is approached in such a way that participation is heavily fragmented and rendered considerably less useful. Zope's single biggest documentation problem is that there is far too much of it that is obsolete and/or non-authoritative. Recruiting new contributors is, at best, a secondary problem. IMO, Zope is burdened by some early choices that were made about how documentation should work. We have put a lot of though into the *technical* questions of *how* to host documentation but little apparent thought into what makes documentation useful or not. I'm working on a side project that I think may provide some of the usefulness questions. At the moment, there's nothing to show, but I expect to put something up in mid-January. If someone else gets around to solving these problems before then, great. Otherwise, we'll see if what I'm cooking up helps out at all. Dylan
Agreed we need more/better documentation. Am very glad the effort is being put forth to do as much on the volunteer basis as is being done, and that the Zope Book continues to be made online available (yay). That said... <2p>The approach taken by JBoss.org has certainly paid dividends for them. Their emphasis from near the beginning has been to focus on developing and selling high quality documentation and lots of training courses, which helps build a well-developed workforce around the product. It also (of course) sets them up as the obvious leaders when it comes to developing enterprise-quality projects using JBoss. I know next to nothing about Zope corp itself, other than that their corporate goal seems to be to offer top quality consulting services around their software. That's the same as JBossgroup, but the JBoss approach to doing so (by advancing the quality of all JBoss developers through better education) also has helped propel enormous growth in popularity of that product -- which, of course, leads to more and better jobs for JBossgroup because JBoss gets increasingly high visibility. So... Zope - great product, tricky to understand, growth good but slow JBoss - nearly great product, great docs and corporate training, growth seems to be through the roof. I think Zope Corp. could likely benefit a great deal by sponsoring/leading the way toward *First Class* documentation for us all. I'm not knocking ZC or their approach -- they do a lot for the Zopistas -- but at a minimum such an effort would pay for itself for ZC (write once, sell many docs, rewrite often, sell subscriptions), and it would increase the trickle of newbies into the fold, and make MUCH more palatable the adoption of Zope the platform into enterprises of all types. </2p> =P *** DTML is dead! Long live DTML! *** At 12:28 PM 11/11/2003, Dylan Reinhardt wrote:
On Tue, 2003-11-11 at 07:40, Andreas Jung wrote:
The Zope API Reference, useful as it is, is far from complete. For example, it does not answer the O.P.'s question.
This raises my old question: why aren't there people in the community willing to contribute to the documentation?
Our documentation is approached in such a way that participation is heavily fragmented and rendered considerably less useful. Zope's single biggest documentation problem is that there is far too much of it that is obsolete and/or non-authoritative. Recruiting new contributors is, at best, a secondary problem.
IMO, Zope is burdened by some early choices that were made about how documentation should work. We have put a lot of though into the *technical* questions of *how* to host documentation but little apparent thought into what makes documentation useful or not.
I'm working on a side project that I think may provide some of the usefulness questions. At the moment, there's nothing to show, but I expect to put something up in mid-January. If someone else gets around to solving these problems before then, great. Otherwise, we'll see if what I'm cooking up helps out at all.
Dylan
--On Dienstag, 11. November 2003 10:24 Uhr -0500 Paul Winkler <pw_lists@slinkp.com> wrote:
On Tue, Nov 11, 2003 at 12:40:45AM -0800, Dennis Allison wrote:
Please take a look at The Zope Book (2_6 Edition). The Appendices contain the API for Zope. The book itself contains a wealth of infomration. The help files are another useful source of information. When all else fails, read the code.
The Zope API Reference, useful as it is, is far from complete. For example, it does not answer the O.P.'s question.
Talking of documentation...Zope lacks an maintained FAQ. Ok, zopelabs.com is not bad but it does not cover the stupid and dumb questions we all hate since they were answered in the past at least once a week on the list :-) For the German Zope User Group we have an FAQ which is growing (slower than we think) but the number of annoying newbie questions has been reduced significantly. -aj
participants (12)
-
Allen -
Andre Meyer -
Andreas Jung -
corey@streamreel.net -
Dennis Allison -
Dieter Maurer -
Dylan Reinhardt -
mlong@datalong.com -
Paul Howell -
Paul Winkler -
Tim Terlegård -
Tom P. Allred