[Zope-Annce] [ANN] ZopeEditManger 0.9.6 Released
I'm pleased to announce the release of ZopeEditManager 0.9.6. ZopeEditManager is a native Cocoa application that provides ExternalEditor functionality for Mac OS X users. Written using the PyObjC bindings, it extends the original work done by Casey Duncan, and makes it possible for Mac users to get the most out of this incredibly useful package. What's new? - built to run on both Mac OS X 10.3 and 10.4 Downloads: Binary: http://www.urbanape.com/downloads/ZopeEditManager-0.9.6.zip Source: http://www.urbanape.com/downloads/ZopeEditManager-0.9.6- src.tgz Thanks, Zachery Bir ___ Zope-Announce maillist - Zope-Announce@zope.org http://mail.zope.org/mailman/listinfo/zope-announce Zope-Announce for Announcements only - no discussions (Related lists - Users: http://mail.zope.org/mailman/listinfo/zope Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PluginIndexes/common/UnIndex.py removed dead code: getIndexSourceNames was defined twice
Log message for revision 30892: removed dead code: getIndexSourceNames was defined twice Changed: UU Zope/trunk/lib/python/Products/PluginIndexes/common/UnIndex.py -=- Modified: Zope/trunk/lib/python/Products/PluginIndexes/common/UnIndex.py === --- Zope/trunk/lib/python/Products/PluginIndexes/common/UnIndex.py 2005-06-22 16:16:19 UTC (rev 30891) +++ Zope/trunk/lib/python/Products/PluginIndexes/common/UnIndex.py 2005-06-22 16:16:57 UTC (rev 30892) @@ -383,10 +383,6 @@ return 0 def getIndexSourceNames(self): - return name of indexed attributes -return (self.id, ) - -def getIndexSourceNames(self): return sequence of indexed attributes try: return self.indexed_attrs Property changes on: Zope/trunk/lib/python/Products/PluginIndexes/common/UnIndex.py ___ Name: cvs2svn:cvs-rev - 1.25 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope] ZPT tutorial
Andreas Jung wrote: --On 21. Juni 2005 23:04:12 +0100 Mark Barratt [EMAIL PROTECTED] wrote: or there's PHP, where the communities are probably more newbie-friendly and there are loads of tutorials. Don't compare PHP with Zope. PHP is a tiny language compared to the fat Zope frameworks. Working with Zope on the scripter level (ZPT, DTMl, ZSQL) requires similar skills as a PHP programmer. If you want to go beyond you have approach open-minded and come a with some solid knowledge in programming and understanding architectural issues in Zope. But when I read some questions here then I have the impression that people except that Zope solves their problems although neither they don't understand the problems themselves nor have the basic skills to reach the goal. That's not a but being newbie-friendly but one can expect as certain level of knowledge when you're working with Zope...e.g. the knowledge how HTML works (that's something kids learn at school nowadays). I agree with all this, though I suspect you underestimate how little many newcomers know, and not just about HTML, where they may have been inflicted with Front Page or learned in Dreamweaver, where you don't have to either write code or do things 'properly'. But also about the big leap required to get from titleSomething/title to title tal:content=template/title|context/titleUntitled Document/title. I think we (the Zope community) should try to be clearer in telling newcomers what the 'entry requirements' are. -- Mark Barratt Text Matters Information design: we help explain things using language | design | systems | process improvement __ phone +44 (0)118 986 8313 email [EMAIL PROTECTED] web http://www.textmatters.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] Re: ZODB error when trying to index object (Input/output error)
Felix Ulrich-Oltean [EMAIL PROTECTED] writes: Just to follow up on the original problem, in case someone else has similar troubles. It turned out that the physical disk was broken - I couldn't even copy the files at the os level. Felix. ___ 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] ZPT tutorial
The Zope Book says this in its preface FWIW: To make effective use of the book, you should know how to use a web browser and you should have a basic understanding of HTML (Hyper Text Markup Language) and URLs (Uniform Resource Locators). You don't need to be a highly-skilled programmer in order to use Zope, but some programming background (particularly object-oriented programming) will be extremely helpful. On Wed, 2005-06-22 at 09:04 +0100, Mark Barratt wrote: Andreas Jung wrote: --On 21. Juni 2005 23:04:12 +0100 Mark Barratt [EMAIL PROTECTED] wrote: or there's PHP, where the communities are probably more newbie-friendly and there are loads of tutorials. Don't compare PHP with Zope. PHP is a tiny language compared to the fat Zope frameworks. Working with Zope on the scripter level (ZPT, DTMl, ZSQL) requires similar skills as a PHP programmer. If you want to go beyond you have approach open-minded and come a with some solid knowledge in programming and understanding architectural issues in Zope. But when I read some questions here then I have the impression that people except that Zope solves their problems although neither they don't understand the problems themselves nor have the basic skills to reach the goal. That's not a but being newbie-friendly but one can expect as certain level of knowledge when you're working with Zope...e.g. the knowledge how HTML works (that's something kids learn at school nowadays). I agree with all this, though I suspect you underestimate how little many newcomers know, and not just about HTML, where they may have been inflicted with Front Page or learned in Dreamweaver, where you don't have to either write code or do things 'properly'. But also about the big leap required to get from titleSomething/title to title tal:content=template/title|context/titleUntitled Document/title. I think we (the Zope community) should try to be clearer in telling newcomers what the 'entry requirements' are. ___ 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] Newbie Questions - many-many relationships? Zope 2 or 3?
On 6/21/05, Jim Vine [EMAIL PROTECTED] wrote: but the Zope Book (2.7 version)'s chapter on Creating a Basic Application all seems to be through the ZMI. Unfortunately is the correct word there. Now, Zope's original appeal to me was using the graphical interface provided by the ZMI to create a collection of objects which if you wire them up correctly will become an application, a view that I think is supported by the Zope Book. Yeah, me too. Turns out it's not such a hot idea after all. :) Disk-based products is the way to go (often just called packages in Zope3). However, this view, and what I've read about Zope 3 seems to indicate that this way of doing things is deprecated. Am I correct here? Particularly, if I am building an app that I think I will want to add extra functionality to after it has been installed and is in use, is this a particular reason to avoid developing with ZMI? Yes, that's a good reason to avoid it, because upgrading becomes problematic. Normally you want one development site and one production site, and you want to develop the code on the development site and then move it to the production site. But when the code and the site is the same, this becomes trickier. Now, if the answer to all of that is yes, then I think that steers me away from the need for TTW development (TTW = Through The Web = ZMI, yes?) Yup. I like the sound of this a bit better - just keep records in one place. So, if I've followed, I let the the house knows who owns it, and if I go to a certain owner's page and want it to give me a list of all the houses she owns, it would do a search through all the house records to see where she's mentioned. Yup. -- 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] ZPT contents slot
On Tue, Jun 21, 2005 at 04:46:55PM -0500, J Cameron Cooper wrote: John Poltorak wrote: Is 'stxfile' the actual filename? I'm not concerned about it being structured initially - just want to see it working in principle with any file containg some text. It's the name of an object. I made up this name for your structure text file, in each of the folders A B C. You may call it as you will. Note: there is no such thing as a file in the ZODB. Everything is an object. Really? You should try clicking on the drop down menu near the Add button of ZMI. That allows you to create a file ;-)... This is how content is viewed. One thing I forgot to mention: you would apply this template (say it's named 'special_view') to your folders, like: http://localhost/A/special_view http://localhost/B/special_view http://localhost/C/special_view Now, if we used a template like this (let's name it 'direct_view'):: divI'm a header/div p tal:replace=structure context/CookedBody This is sample page content /p divI'm a footer/div we could apply it like so:: http://localhost/A/stxfile/direct_view http://localhost/B/stxfile/direct_view http://localhost/C/stxfile/direct_view This is a much more typical pattern, at least for content. If you want to apply a wrapper to page templates, then you use macros. I can't say I understood much of that, but this web page gave me an example of exactly what I wanted to do:- http://www.zopelabs.com/cookbook/1092772190 Here is the code snippet which looks somewhat different to that which you suggested, or is it basically the same? html body !-- assume there is a file or other object containing structured text, and it's called foobar. -- span tal:define=stx python:modules['Products'].PythonScripts.standard.structured_text; the_text here/foobar tal:content=structure python:stx(the_text) The structured text goes here. /span /body /html The problem is finding such examples, but at least in this instance I've learnt something, so thanks for the help. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com -- John ___ 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] ZPT tutorial
I think we (the Zope community) should try to be clearer in telling newcomers what the 'entry requirements' are. My preference is to lie about the complexity. Newcomers are welcoming it much more then. Because if you say it is easy people will blame themselfs if they get stuck and to avoid embarrasment they will try a little harder. Try giving someone a logic puzzle and say it's dirt easy, it'll take you 2 minutes and they'll try really hard. If you say don't bother because you need a basketballsized brain to do they will give up and neither learn nor attempt. Let's keep the fluff around the meat welcoming. So instead of You must have previous knowledge of XHTML 1.0 we can say Previous experience of HTML will help understanding how ZPT's work but it's not a requirement -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] ZPT tutorial
On Tue, Jun 21, 2005 at 11:04:12PM +0100, Mark Barratt wrote: John Poltorak wrote: I was on a course over the weekend where ordinary people in their 70's with no technical ability were knocking together websites in just a few hours with no prior training and no understanding of the underlying concepts involved. Why should Zope be just as easy? Because Zope is hard. You can make some great sites/applications with Zope but for all except the very simplest you need . advanced understanding of html and xml or . a thorough grounding in programming principles or . a working knowledge of Python - and preferably all three. Whilst Zope can be used for developing extremely complex sites, that shouldn't preclude it as a development tool for simple sites. I think expertise only develops through extended usage of Zope, but there is just so much to learn, although I don't see a need to be an expert in numerous fields before touching Zope. Most (not all) of the people who hang out here have all three of these skill sets, and like many skilled people, they find it hard to understand that the skills they have seem arcane to beginners. You should also understand that nobody (AFAIK) is 'them' with an interest in making Zope easy and helping you. You depend on the kindness of strangers, so politeness and gratitude pay. Yes, I am aware of this. I also think that this list is not really appropriate for newbies, but in the absence of an alternative, this is where I ask my newbie questions. In addition, Zope is heading fast into even less friendly territory. DTML, which is technically 'mucky' but reasonably easy to grasp for non-programmers, is increasingly deprecated. Through-the-web editing likewise. I'm not saying these trends are bad, just that they are happening, they make the learning curve steeper, and that they lock out almost all casual users unless they have the skills noted above. The alternative in the Zope world is Plone, where you can get a site up and rolling in very little time (as long as you are happy for it to look and operate like almost every other Plone site on the planet). I looked at Plone but it is way too slow for the server I'm using. Besides that customisation looks like another learning cliff. or there's PHP, where the communities are probably more newbie-friendly and there are loads of tutorials. I'm sufficiently aware of Zope to know it provides a far more comprehensive build environment than PHP ever will and I would like to adopt it as my platform of choice, but it would be nice if the ZOPE support community was as newbie-friendly as the PHP crowd. Loads of tutorials and worked examples would be nice too. Reading a manual is no substitute for being shown how to build a web page using ZOPE and just reading through dozens of isolated examples of ZPT techniques makes progress very slow. I would much rather see a tutorial which starts of with a relatively complex but easily reproducible template which creates an interesting page, but then proceeds to de-construct what it does and how it does it. or you could decide that Zope does some stuff which you must have, in which case David H's stereotypical response If you spent more time just *learning* Zope and HTML, etc and less time rationalizing your lack of progress everyone would be happy. is appropriate. I only need to rationlise it when people constantly keep telling me to read the Zope Book as if that is the solution to everything. Fortunately there are a few people here who can still remember suffering the same plight as I am currently in an I'm grateful to them for their help. Good luck. -- Mark Barratt Text Matters Information design: we help explain things using language | design | systems | process improvement __ phone +44 (0)118 986 8313 email [EMAIL PROTECTED] skype mark_barratt web http://www.textmatters.com -- John ___ 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] Newbie Questions - many-many relationships? Zope 2 or 3?
On 21.Jun 2005 - 21:59:41, Jim Vine wrote: Say, for example that my Zope App in some way has a House object, which records the address, the owner, and a short description. Later on, I may wish to add further fields to record, say, the number of bedrooms, but the system is already in use - if I've developed in the ZMI, will this make it harder to make an upgrade? Such a change might not be a problem using ZMI, as you can freely add properties to any object. You'd have to supply the data for all existing objects though (but you'd need to do that when using a product too). OK, so there are (at least) three ways of doing things in Zope: 1. Using the ZMI to build an application using standard objects (classes) 2. Creating new classes to use in your app through the ZMI. 3. Creating new classes to use in your app in Python. Most of the Zope Book concentrates on method 1, and the Extending Zope chapter is about method 2 - it mentions method 3, but says that it's beyond the scope of the book. I think I've convinced myself that the complexity of my app takes it beyond method 1, but I'm strugling to get my head around the implications of selecting method 2 or 3. Am I right in thinking that either of these will result in my building a Product? If I want to add extra feature to my product on the development server and then port them to the live server (with all the data on the live server being left in tact), will selection of either of these particularly help or hinder me in this? Apologies for asking so many questions, and thanks to those who have helped so far. I guess I'm just keen to start from the right place at the beginning, so save myself headaches further down the line. Thanks, Jim ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.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] ZPT tutorial
+---[ John Poltorak ]-- | On Tue, Jun 21, 2005 at 11:04:12PM +0100, Mark Barratt wrote: | [Snip] | Most (not all) of the people who hang out here have all three of these | skill sets, and like many skilled people, they find it hard to | understand that the skills they have seem arcane to beginners. You | should also understand that nobody (AFAIK) is 'them' with an interest in | making Zope easy and helping you. You depend on the kindness of | strangers, so politeness and gratitude pay. | | Yes, I am aware of this. I also think that this list is not really | appropriate for newbies, but in the absence of an alternative, this is | where I ask my newbie questions. There's also #zope on irc.freenode.net, although you have to put up with a certain amount of heckling :-) People are willing to give you direction, but, will also tell you to consult the zope book. If you let them, they will also completely redesign your application for you so it fits better with the way they think it should work (so don't let them do that to you :-) Even though #zope is sometimes a harsh mistress, it makes me proud to see people who have survived it, helping people on the mailing lists themselves now. Oh, it also pays to be patient, while people might not be talking in a flurry of activity, someone usually has at least half-an-eye on the channel and will respond to you eventually. -- Andrew Milton [EMAIL PROTECTED] ___ 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] Newbie Questions - many-many relationships? Zope 2 or 3?
On 6/22/05, Jim Vine [EMAIL PROTECTED] wrote: I think I've convinced myself that the complexity of my app takes it beyond method 1, but I'm strugling to get my head around the implications of selecting method 2 or 3. Am I right in thinking that either of these will result in my building a Product? Yes. If I want to add extra feature to my product on the development server and then port them to the live server (with all the data on the live server being left in tact), will selection of either of these particularly help or hinder me in this? I don't know, because when I tried 2., it turned out to be quite complicated, and I never understood how to do it. So I did 3. And afterwards I have realized that even if you do understand how to do 2, the fact that you do most of your stuff in the restricted python scripts and dtml or ZPT, means that you have tons of limitations to go around. In addition to that, you can't easily use any proper editors to edit the code, which is very annoying. Method 2 (aka ZClasses) simply seem to offer exactly zero benefits, and loads of drawbacks. Also, as mentioned earlier, unless you want to build your application on top of one of the Zope2 content management systems around (CPS, Plone, Silva, ...) you probably want too use Zope3 for your application development anyway. And then only method 3 (disk based development) is available. -- 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] Newbie Questions - many-many relationships? Zope 2 or 3?
Hi Jim, Jim Vine wrote: I’d greatly appreciate any guidance that can be provided on these subjects. I know a lot has been said since your original query, but re-reading it I was surprised that no one had asked a fundamental question: - If the data is structured in nature and fits the relational model well (e.g. is well defined), why not use an RDBMS for the data, and Zope/Plone for the UI? I do full-time development of web-based RDBMS applications in Zope and Plone (MS SQL and Firebird), and I have the following observations: - - By putting database-related complexity in the database, where it belongs IMHO, you may find (as I have) that the complexity of what you need to accomplish in Zope is reduced to the point where the ZMI approach is entirely appropriate. - You will find yourself working very hard to implement a relational database in the ZODB, compared to interfacing to an RDBMS. If you need one, I'd use one - instead of writing one! ;-) YMMV and all that - I /am/ an RDBMS zealot (see Fabian Pascal's writing for the mindset!), and I am /not/ a Python wizard (although my Python-Fu grows stronger by the day due to immersion in Zope...), so my choice of approach was strongly influenced by my starting point. -- Regards, PhilK Email: [EMAIL PROTECTED] PGP Public key: http://www.xfr.co.uk Voicemail Facsimile: 07092 070518 You'll find that one part's sweet and one part's tart: say where the sweetness and the sourness start. - Tony Harrison ___ 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] Newbie Questions - many-many relationships? Zope 2 or 3?
On 22.Jun 2005 - 12:04:02, Jim Vine wrote: On 21.Jun 2005 - 21:59:41, Jim Vine wrote: Say, for example that my Zope App in some way has a House object, which records the address, the owner, and a short description. Later on, I may wish to add further fields to record, say, the number of bedrooms, but the system is already in use - if I've developed in the ZMI, will this make it harder to make an upgrade? Such a change might not be a problem using ZMI, as you can freely add properties to any object. You'd have to supply the data for all existing objects though (but you'd need to do that when using a product too). OK, so there are (at least) three ways of doing things in Zope: 1. Using the ZMI to build an application using standard objects (classes) 2. Creating new classes to use in your app through the ZMI. 3. Creating new classes to use in your app in Python. Most of the Zope Book concentrates on method 1, and the Extending Zope chapter is about method 2 - it mentions method 3, but says that it's beyond the scope of the book. See the Zope Developers Guide for a first glance at method 3. get my head around the implications of selecting method 2 or 3. Am I right in thinking that either of these will result in my building a Product? No, method 2 aka ZClasses don't involve producing a Product. But there were issues in the past with ZClasses AFAIK. So it might be better to stay away from them. On the other hand quite a bunch of people reading here are using them for their apps... If I want to add extra feature to my product on the development server and then port them to the live server (with all the data on the live server being left in tact), will selection of either of these particularly help or hinder me in this? Hmm, my knowlegde of ZClasses is somewhat limited (as I found writing a pyhton product easier - but then I am a programmer...), so I can only tell you what product based apps have there. Adding new class members is easy and running instances catch those up. Adding new properties in such a class works too. Changing the name of properties isn't that easy, you'd have to write a conversion function or script that runs over all the instances and takes the value of the old property and put's it into the new name. Adding an instance variable will also not influence your existing instances. Andreas -- It's a very *__UN*lucky week in which to be took dead. -- Churchy La Femme ___ 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] ZopeZoo
In my quest to get to grips with the basics of ZPT I eventually stumbled across ZopeZoo which I found very useful. Looking at it again, there seem to be several variations of the same examples. I used this one:- http://www.plope.com/Books/2_7Edition/SimpleExamples.stx#2-10 but find there are a couple of variations here:- http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/SimpleExamples.stx http://www.zope.org/Members/jwhitener/zopeZoo_2_6 Is there a definitive site for ZopeZoo? And is there a followup anywhere? I found I was getting the hang of it but could have done with a part two to show how to incorporate various divisions such as columns under ZPT. -- John ___ 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] bytecode cache?
Dear zope core developers, I have idea about bytecode cache in Zope, it is possible to implement? What I mean: python scripts (in ZODB), DTML documents/methods, ZPT will be bytecode compiled in similar way like ordinary .py scripts into .pyc and then run much faster than noncompiled ZODB objects. I think that it should have significant speed improvement. ... or I am totally out? Best regards, -- Jaroslav Lukesh - This e-mail could not contain any viruses because I use Linux ___ 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] bytecode cache?
Well, as far as I know, bytecode is generated by the marshal module. And marshal can only precompile simple data types and code (classes, functions). So objects (class instances) can not be byte compiled. But I may be wrong... However, I had a funny idea too... I have been wondering about using marshal in ZODB instead of pickle, I mean, we only store object's states there, and as far as I have been investigating object states are simple python types that could be handled by marshal... But I am pretty sure I may have missed something that makes this completely impossible to achieve. It's just that, even using the highest protocol in pickle, serialization and deserialization of simple python types is much faster with marshal. Pascal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jaroslav Lukeš Sent: 22 June 2005 13:52 To: zope@zope.org Subject: [Zope] bytecode cache? Dear zope core developers, I have idea about bytecode cache in Zope, it is possible to implement? What I mean: python scripts (in ZODB), DTML documents/methods, ZPT will be bytecode compiled in similar way like ordinary .py scripts into .pyc and then run much faster than noncompiled ZODB objects. I think that it should have significant speed improvement. ... or I am totally out? Best regards, -- Jaroslav Lukesh - This e-mail could not contain any viruses because I use Linux ___ 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 )
[Zope] Re: ZopeZoo
Hi John! John Poltorak wrote: In my quest to get to grips with the basics of ZPT I eventually stumbled across ZopeZoo which I found very useful. Looking at it again, there seem to be several variations of the same examples. I used this one:- http://www.plope.com/Books/2_7Edition/SimpleExamples.stx#2-10 This one is the latest version and as soon as the 2.7 edition (or maybe it will become the 2.8 edition) of the Zope Book is done it will replace the 2.6 edition on zope.org. This chapter is not finished jet. The last part is just copied from the 2.6 edition and doesn't work with the rest. but find there are a couple of variations here:- http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/SimpleExamples.stx This one is the last 'official' version, but I would not recommend to use it. http://www.zope.org/Members/jwhitener/zopeZoo_2_6 The 2.7 rewrite is based on this text, but while this text is a 'stand alone' tutorial, the book chapter builds on top of the previous chapters. Is there a definitive site for ZopeZoo? And is there a followup anywhere? I found I was getting the hang of it but could have done with a part two to show how to incorporate various divisions such as columns under ZPT. The guest book example has to be converted to ZPT anyway, but the highest priority should be to *finish* the latest edition, not adding new examples. Cheers, Yuppie ___ 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] automagic reindexing of objects
hi all! as i had time to look at all the stuff, i realized, that i'm getting closer, but this is not exactly what i wanted... as i can see from the path, one has to call: beforeCommitHook(method, **args, **kwargs) on each transaction, correct? this is contrary to my idea of everything doing it's work automagically. what i want is a kind of callback to each dirty object, something like this: class Transaction(...): def commit(self, ...): # insert this: for object in self._objects: try: object._before_transaction_commit() except AttributeError: pass # rest of original commit() follows... could this impose any unforseen behaviour? btw: what version of the two following is better (i.e. faster and more elegeant, i do python coding since abt. 6months only...) try: object._before_transaction_commit() except AttributeError: pass or hook = object.get('_before_transaction_commit', None) if hook: hook() another question: is it hook() or hook(object) in the previous line? i never know if the self parameter has to be passed in if not called as self.method() - are there any (simple) rules? regards, juergen herrmann [ Florent Guillaume wrote:] Dieter Maurer [EMAIL PROTECTED] wrote: Jürgen Herrmann wrote at 2005-6-17 14:19 +0200: i make heavy use of indexes in my extension classes. these all inherit from catalogpathaware, so i have to call object.reindex_object() on each changed instance. calling it from attribute getters/setters f.ex. is not a good idea, because changing 3 attributes will reindex the object 3 times. what i'd like to have is that such objects are reindexed automatically before comitting a transaction. is it possible? where should i start looking in the source, is there possibly a before_transaction_commit hook? It is impossible with ZODB 3.2 (unless you patch ZODB.Transaction.Transaction). The CPSCompat module of CPS has monkey-patches that backport this from ZODB 3.4, among others, to be used in Zope 2.7. http://svn.nuxeo.org/trac/pub/file/CPSCompat/trunk/PatchZODBTransaction.py Florent ZODB 3.4 (which is used for Zope 2.8/3.1) has hooks that makes it possible. -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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 ) ___ XLhost.de - eXperts in Linux hosting Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de ___ 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] automagic reindexing of objects
Have a look at how CPS uses this hook to delay indexing to the end of the transaction. Code is at http://svn.nuxeo.org/trac/pub/file/CPSCore/trunk/ IndexationManager.py Then in all objects for which we want to delay indexing, we replace the reindexObject() method with: def reindexObject(self, idxs=[]): Schedule object for reindexation get_indexation_manager().push(self, idxs=idxs) And the IndexationManager calls _reindexObject at the end of the transaction. This is done for instance in http://svn.nuxeo.org/trac/pub/file/ CPSCore/trunk/ProxyBase.py Florent On 22 Jun 2005, at 14:58, Jürgen Herrmann wrote: hi all! as i had time to look at all the stuff, i realized, that i'm getting closer, but this is not exactly what i wanted... as i can see from the path, one has to call: beforeCommitHook(method, **args, **kwargs) on each transaction, correct? this is contrary to my idea of everything doing it's work automagically. what i want is a kind of callback to each dirty object, something like this: class Transaction(...): def commit(self, ...): # insert this: for object in self._objects: try: object._before_transaction_commit() except AttributeError: pass # rest of original commit() follows... could this impose any unforseen behaviour? btw: what version of the two following is better (i.e. faster and more elegeant, i do python coding since abt. 6months only...) try: object._before_transaction_commit() except AttributeError: pass or hook = object.get('_before_transaction_commit', None) if hook: hook() another question: is it hook() or hook(object) in the previous line? i never know if the self parameter has to be passed in if not called as self.method() - are there any (simple) rules? regards, juergen herrmann [ Florent Guillaume wrote:] Dieter Maurer [EMAIL PROTECTED] wrote: Jürgen Herrmann wrote at 2005-6-17 14:19 +0200: i make heavy use of indexes in my extension classes. these all inherit from catalogpathaware, so i have to call object.reindex_object() on each changed instance. calling it from attribute getters/setters f.ex. is not a good idea, because changing 3 attributes will reindex the object 3 times. what i'd like to have is that such objects are reindexed automatically before comitting a transaction. is it possible? where should i start looking in the source, is there possibly a before_transaction_commit hook? It is impossible with ZODB 3.2 (unless you patch ZODB.Transaction.Transaction). The CPSCompat module of CPS has monkey-patches that backport this from ZODB 3.4, among others, to be used in Zope 2.7. http://svn.nuxeo.org/trac/pub/file/CPSCompat/trunk/ PatchZODBTransaction.py Florent ZODB 3.4 (which is used for Zope 2.8/3.1) has hooks that makes it possible. -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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 ) __ _ XLhost.de - eXperts in Linux hosting Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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] bytecode cache?
I have idea about bytecode cache in Zope, it is possible to implement? What I mean: python scripts (in ZODB), DTML documents/methods, ZPT will be bytecode compiled in similar way like ordinary .py scripts into .pyc and then run much faster than noncompiled ZODB objects. I think that it should have significant speed improvement. ... or I am totally out? Python scripts already cache a bytecode representation (or at least they did last time I looked - its been awhile). Not sure what you mean by a byte-code representation of DTML or ZPT... Brian Lloyd[EMAIL PROTECTED] V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.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] automagic reindexing of objects
[ Jürgen Herrmann wrote:] ... hook = object.get('_before_transaction_commit', None) if hook: hook() ... of course it should be: getattr(object, '_before_transaction_commit', None) regards, juergen herrmann ___ XLhost.de - eXperts in Linux hosting Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de ___ 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] Newbie Questions - many-many relationships? Zope 2 or 3?
On Wed, Jun 22, 2005 at 02:02:30PM +0200, Andreas Pakulat wrote: No, method 2 aka ZClasses don't involve producing a Product. Sure it does. A ZClass-based Product is still a Product. As for why I don't use ZClasses: 1) Doing everything in restricted mode is a big pain. You end up writing a bunch of external methods anyway. 2) Source code version control is mandatory, and ZClasses make it nearly impossible. -- Paul Winkler 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] Traversal question
I have gone over the zope book to see what I can do about calling a sql with a form and getting three additional parameters in the request and am wanting this to get better looking urls that calling the parameters directly in the url. I asked a similar question yesterday but perhaps it was not clear enough about what asking. It is really a traversal question and how to string together a sql query with a zpt form that also requires parameters from the request namespace. I can call my zsql method and then my edit form like this: /employee_by_id/employee_id/42/employee_edit_form or with simple direct traversal on the zsql method: /employee_by_id/42/employee_edit_form Problem is I need three other parameters in the request for my edit form to satisfy my sorting so when the edit form returns it is back on the same batch page Parameters passed in traversal go into the request namespace according to the zope book so was hoping for something similar to this which doesn't work - and I can't see how it could. /employee_by_id/employee_id/42/employee_edit_form/start/2/sort/ employee/reverse/0 The zope book examples are with python scripts so am not sure whether this is possible with a ZPT that also requires parameters from the request or will I need a script to be called in the path somewhere to pick up the results of the query and then pass parameters to the form - something like: /employee_by_id/employee_id/42/some_other_script/start/2/sort/employee/ reverse/0/employee_edit_form where some_other_script would be a script python. Any hints to help me understand what can be done with traversal like this would be appreciated since I would rather have nice urls instead of stringing parameters directly in the url with all the ?= and 's. 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 )
[Zope] From Zope 2.5.1 to Zope 2.7.6
I am upgrading our current Zope from 2.5.1 to Zope 2.7.6. I have the new version installed as a different instance on a different server. The Zope 2.5.1 is in tact and what I am wondering is, how do you migrate everything from the older to the newer? I thought exporting the .zexp out of Zope 2.5.1 would be ok. However, when I import it into the new install, it isn't the same as the original. For example, I exported knowledge.zexp from the 2.5.1 and imported into the 2.7.6. Now, when I go to pull up the page that points to info related to this data, the subtopics are now listed below the contents of the original page. In looking at the html (I am no HTML expert at ALL), it did not appear that there was even anything related to subtopics. It must be a control from within the Zope management interface. I guess I just want to know how to migrate properly with little administrative effort. Thanks, Tim ___ 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] Traversal question
- Original Message - From: David Pratt [EMAIL PROTECTED] I have gone over the zope book to see what I can do about calling a sql with a form and getting three additional parameters in the request and am wanting this to get better looking urls that calling the parameters directly in the url. I asked a similar question yesterday but perhaps it was not clear enough about what asking. It is really a traversal question and how to string together a sql query with a zpt form that also requires parameters from the request namespace. I can call my zsql method and then my edit form like this: /employee_by_id/employee_id/42/employee_edit_form or with simple direct traversal on the zsql method: /employee_by_id/42/employee_edit_form Problem is I need three other parameters in the request for my edit form to satisfy my sorting so when the edit form returns it is back on the same batch page Parameters passed in traversal go into the request namespace according to the zope book so was hoping for something similar to this which doesn't work - and I can't see how it could. /employee_by_id/employee_id/42/employee_edit_form/start/2/sort/ employee/reverse/0 The zope book examples are with python scripts so am not sure whether this is possible with a ZPT that also requires parameters from the request or will I need a script to be called in the path somewhere to pick up the results of the query and then pass parameters to the form - something like: /employee_by_id/employee_id/42/some_other_script/start/2/sort/employee/ reverse/0/employee_edit_form where some_other_script would be a script python. Any hints to help me understand what can be done with traversal like this would be appreciated since I would rather have nice urls instead of stringing parameters directly in the url with all the ?= and 's. I am sure you don't want to hear this, but that's what '? = ' are for. If you really want to make your life complicated you could look into storing the parameters in cookies or session data, but those are pretty ugly work-arounds just so you can have pretty urls. Jonathan ___ 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] From Zope 2.5.1 to Zope 2.7.6
On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: I am upgrading our current Zope from 2.5.1 to Zope 2.7.6. I have the new version installed as a different instance on a different server. The Zope 2.5.1 is in tact and what I am wondering is, how do you migrate everything from the older to the newer? I thought exporting the .zexp out of Zope 2.5.1 would be ok. However, when I import it into the new install, it isn't the same as the original. For example, I exported i would suggest setting up the new zope 2.7.6 instance, copy all products used, and Data.fs to var start zope, see if it complains. if not, you're good. else, check the traceback, do something, and start zope again. repeat. hth ___ 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 ) -- http://myzope.kedai.com.my - my-zope 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] From Zope 2.5.1 to Zope 2.7.6
Are any of your applications relying on the 'bobobase_modification_time' attribute? That's something that changes when you import a .zexp file which could maybe explain why things appear differently now. On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: I am upgrading our current Zope from 2.5.1 to Zope 2.7.6. I have the new version installed as a different instance on a different server. The Zope 2.5.1 is in tact and what I am wondering is, how do you migrate everything from the older to the newer? I thought exporting the .zexp out of Zope 2.5.1 would be ok. However, when I import it into the new install, it isn't the same as the original. For example, I exported knowledge.zexp from the 2.5.1 and imported into the 2.7.6. Now, when I go to pull up the page that points to info related to this data, the subtopics are now listed below the contents of the original page. In looking at the html (I am no HTML expert at ALL), it did not appear that there was even anything related to subtopics. It must be a control from within the Zope management interface. I guess I just want to know how to migrate properly with little administrative effort. Thanks, Tim ___ 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] Traversal question
I have never used traversal into zsql methods simply because I don't want to expose geeky things like employee_by_id to the user. People should be able to find out what you call your ZSQL methods. My suggestion is to consider a more controlled solution. About having request variables in the URL I suggest you download and study the code of the IssueTrackerProduct. Look for a method called get_environ and __before_bobobase_traverse__ Then one gets URLs like this: http://demo.issuetrackerproduct.com/ListIssues/sortorder-urgency/reverse-true which is translated in get_environ() to http://demo.issuetrackerproduct.com/ListIssues?sortorder=urgencyreverse=true On 6/22/05, David Pratt [EMAIL PROTECTED] wrote: I have gone over the zope book to see what I can do about calling a sql with a form and getting three additional parameters in the request and am wanting this to get better looking urls that calling the parameters directly in the url. I asked a similar question yesterday but perhaps it was not clear enough about what asking. It is really a traversal question and how to string together a sql query with a zpt form that also requires parameters from the request namespace. I can call my zsql method and then my edit form like this: /employee_by_id/employee_id/42/employee_edit_form or with simple direct traversal on the zsql method: /employee_by_id/42/employee_edit_form Problem is I need three other parameters in the request for my edit form to satisfy my sorting so when the edit form returns it is back on the same batch page Parameters passed in traversal go into the request namespace according to the zope book so was hoping for something similar to this which doesn't work - and I can't see how it could. /employee_by_id/employee_id/42/employee_edit_form/start/2/sort/ employee/reverse/0 The zope book examples are with python scripts so am not sure whether this is possible with a ZPT that also requires parameters from the request or will I need a script to be called in the path somewhere to pick up the results of the query and then pass parameters to the form - something like: /employee_by_id/employee_id/42/some_other_script/start/2/sort/employee/ reverse/0/employee_edit_form where some_other_script would be a script python. Any hints to help me understand what can be done with traversal like this would be appreciated since I would rather have nice urls instead of stringing parameters directly in the url with all the ?= and 's. 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] ZPT tutorial
I'm sufficiently aware of Zope to know it provides a far more comprehensive build environment than PHP ever will and I would like to adopt it as my platform of choice, but it would be nice if the ZOPE support community was as newbie-friendly as the PHP crowd. Loads of tutorials and worked examples would be nice too. Reading a manual is no substitute for being shown how to build a web page using ZOPE and just reading through dozens of isolated examples of ZPT techniques makes progress very slow. I would much rather see a tutorial which starts of with a relatively complex but easily reproducible template which creates an interesting page, but then proceeds to de-construct what it does and how it does it. just in case you've missed it, open zmi add Zope Tutorial go through it write up your exp for other new users jumping in! hth or you could decide that Zope does some stuff which you must have, in which case David H's stereotypical response If you spent more time just *learning* Zope and HTML, etc and less time rationalizing your lack of progress everyone would be happy. is appropriate. I only need to rationlise it when people constantly keep telling me to read the Zope Book as if that is the solution to everything. Fortunately there are a few people here who can still remember suffering the same plight as I am currently in an I'm grateful to them for their help. Good luck. -- Mark Barratt Text Matters Information design: we help explain things using language | design | systems | process improvement __ phone +44 (0)118 986 8313 email [EMAIL PROTECTED] skype mark_barratt web http://www.textmatters.com -- John ___ 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 ) -- http://myzope.kedai.com.my - my-zope 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] Traversal question
Hi Jonathan. Thank you for your reply. The ? = don't make for very friendly or future proof urls. I have thought of this possibility you have suggested but thought there might be a way to do this with traversal. I read a tutorial by Chris McDonough getting rid of the ? = appeared to be one of the goals of using zope's traversal. I am exploring the possibilities of getting rid of the ? = in my application. Regards, David On Wednesday, June 22, 2005, at 12:14 PM, Jonathan wrote: - Original Message - From: David Pratt [EMAIL PROTECTED] I have gone over the zope book to see what I can do about calling a sql with a form and getting three additional parameters in the request and am wanting this to get better looking urls that calling the parameters directly in the url. I asked a similar question yesterday but perhaps it was not clear enough about what asking. It is really a traversal question and how to string together a sql query with a zpt form that also requires parameters from the request namespace. I can call my zsql method and then my edit form like this: /employee_by_id/employee_id/42/employee_edit_form or with simple direct traversal on the zsql method: /employee_by_id/42/employee_edit_form Problem is I need three other parameters in the request for my edit form to satisfy my sorting so when the edit form returns it is back on the same batch page Parameters passed in traversal go into the request namespace according to the zope book so was hoping for something similar to this which doesn't work - and I can't see how it could. /employee_by_id/employee_id/42/employee_edit_form/start/2/sort/ employee/reverse/0 The zope book examples are with python scripts so am not sure whether this is possible with a ZPT that also requires parameters from the request or will I need a script to be called in the path somewhere to pick up the results of the query and then pass parameters to the form - something like: /employee_by_id/employee_id/42/some_other_script/start/2/sort/ employee/ reverse/0/employee_edit_form where some_other_script would be a script python. Any hints to help me understand what can be done with traversal like this would be appreciated since I would rather have nice urls instead of stringing parameters directly in the url with all the ?= and 's. I am sure you don't want to hear this, but that's what '? = ' are for. If you really want to make your life complicated you could look into storing the parameters in cookies or session data, but those are pretty ugly work-arounds just so you can have pretty urls. Jonathan ___ 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] Traversal question
Hi Peter. This is very interesting. I will look at the code! I agree with you about exposing the zsql methods and also I tend to use a naming convention for zsql methods might even stick out more. Many thanks for your reply. Regards, David On Wednesday, June 22, 2005, at 12:27 PM, Peter Bengtsson wrote: I have never used traversal into zsql methods simply because I don't want to expose geeky things like employee_by_id to the user. People should be able to find out what you call your ZSQL methods. My suggestion is to consider a more controlled solution. About having request variables in the URL I suggest you download and study the code of the IssueTrackerProduct. Look for a method called get_environ and __before_bobobase_traverse__ Then one gets URLs like this: http://demo.issuetrackerproduct.com/ListIssues/sortorder-urgency/ reverse-true which is translated in get_environ() to http://demo.issuetrackerproduct.com/ ListIssues?sortorder=urgencyreverse=true On 6/22/05, David Pratt [EMAIL PROTECTED] wrote: I have gone over the zope book to see what I can do about calling a sql with a form and getting three additional parameters in the request and am wanting this to get better looking urls that calling the parameters directly in the url. I asked a similar question yesterday but perhaps it was not clear enough about what asking. It is really a traversal question and how to string together a sql query with a zpt form that also requires parameters from the request namespace. I can call my zsql method and then my edit form like this: /employee_by_id/employee_id/42/employee_edit_form or with simple direct traversal on the zsql method: /employee_by_id/42/employee_edit_form Problem is I need three other parameters in the request for my edit form to satisfy my sorting so when the edit form returns it is back on the same batch page Parameters passed in traversal go into the request namespace according to the zope book so was hoping for something similar to this which doesn't work - and I can't see how it could. /employee_by_id/employee_id/42/employee_edit_form/start/2/sort/ employee/reverse/0 The zope book examples are with python scripts so am not sure whether this is possible with a ZPT that also requires parameters from the request or will I need a script to be called in the path somewhere to pick up the results of the query and then pass parameters to the form - something like: /employee_by_id/employee_id/42/some_other_script/start/2/sort/ employee/ reverse/0/employee_edit_form where some_other_script would be a script python. Any hints to help me understand what can be done with traversal like this would be appreciated since I would rather have nice urls instead of stringing parameters directly in the url with all the ?= and 's. 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] Newbie Questions - many-many relationships? Zope 2 or 3?
On 22.Jun 2005 - 09:52:23, Paul Winkler wrote: On Wed, Jun 22, 2005 at 02:02:30PM +0200, Andreas Pakulat wrote: No, method 2 aka ZClasses don't involve producing a Product. Sure it does. A ZClass-based Product is still a Product. Can't remember to have created a product, but then this was 2years ago... Andreas -- Exercise caution in your daily affairs. ___ 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] Traversal question
Hi Pascal. These are good suggestions. Can you point me to something that could help me with the Site Access Rule part of this solution? I am sure I can google for a mod_rewrite rule that could help. Regards, David On Wednesday, June 22, 2005, at 12:18 PM, Pascal Peregrina wrote: Traversal is not meant to have pretty urls. To do such, I would either : - add a Site Access Rule in the root folder that would rewrite the url from the nice form to the physical location of the script and add the parameters to the request object. - use Apache in front of Zope and some mod_rewrite magic ___ 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] From Zope 2.5.1 to Zope 2.7.6
Excuse the newbie question, but how would I find that out? I inherited this 'project' of upgrading Zope and migrating the data. I have had NO help with it so I have been banging through it all the way. Thanks, Tim On Wed, 2005-06-22 at 16:22 +0100, Peter Bengtsson wrote: Are any of your applications relying on the 'bobobase_modification_time' attribute? That's something that changes when you import a .zexp file which could maybe explain why things appear differently now. On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: I am upgrading our current Zope from 2.5.1 to Zope 2.7.6. I have the new version installed as a different instance on a different server. The Zope 2.5.1 is in tact and what I am wondering is, how do you migrate everything from the older to the newer? I thought exporting the .zexp out of Zope 2.5.1 would be ok. However, when I import it into the new install, it isn't the same as the original. For example, I exported knowledge.zexp from the 2.5.1 and imported into the 2.7.6. Now, when I go to pull up the page that points to info related to this data, the subtopics are now listed below the contents of the original page. In looking at the html (I am no HTML expert at ALL), it did not appear that there was even anything related to subtopics. It must be a control from within the Zope management interface. I guess I just want to know how to migrate properly with little administrative effort. Thanks, Tim ___ 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] From Zope 2.5.1 to Zope 2.7.6
Try something like this: $ cd zopehome/Products/ $ grep -rn bobobase_modification_time . That will tell you if any of your diskbased python products rely on bobobase_modification_time On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: Excuse the newbie question, but how would I find that out? I inherited this 'project' of upgrading Zope and migrating the data. I have had NO help with it so I have been banging through it all the way. Thanks, Tim On Wed, 2005-06-22 at 16:22 +0100, Peter Bengtsson wrote: Are any of your applications relying on the 'bobobase_modification_time' attribute? That's something that changes when you import a .zexp file which could maybe explain why things appear differently now. On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: I am upgrading our current Zope from 2.5.1 to Zope 2.7.6. I have the new version installed as a different instance on a different server. The Zope 2.5.1 is in tact and what I am wondering is, how do you migrate everything from the older to the newer? I thought exporting the .zexp out of Zope 2.5.1 would be ok. However, when I import it into the new install, it isn't the same as the original. For example, I exported knowledge.zexp from the 2.5.1 and imported into the 2.7.6. Now, when I go to pull up the page that points to info related to this data, the subtopics are now listed below the contents of the original page. In looking at the html (I am no HTML expert at ALL), it did not appear that there was even anything related to subtopics. It must be a control from within the Zope management interface. I guess I just want to know how to migrate properly with little administrative effort. Thanks, Tim ___ 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] Re: Problem with keep-alive timeout (zope: addressed to exclusive (zope: addressed to exclusive sender for this address) sender for this address)
On Tuesday 21 June 2005 23:28, Tres Seaver - [EMAIL PROTECTED] wrote: No that's not possible with HTTP1.0. The problem is, why IE is using HTTP1.0? With HTTP1.1 its possible to change keepalive-timeout. 'keepalive' only refers to the lenght of time that the browser-webserver connection stays open between the completion of one request and the beginning of another to the same server. The behavior we are discussing here is that IE (or sometimes Apache in the middle) is configured to time out a single request after a period of time; Mozilla and derived browsers don't do that by default. MS says: By default, HTTP 1.1 is enabled in Internet Explorer except when you establish an HTTP connection through a proxy server. When HTTP 1.1 is enabled, HTTP connections remain open (or persistent) by default until the connection is idle for one minute or until the value that is specified by the KeepAliveTimeout value in the registry is reached. You can modify HTTP 1.1 settings in Internet Explorer by using the Advanced tab in the Internet Options dialog box.(http://support.microsoft.com/default.aspx?kbid=813827) I interpret this so: You have to use HTTP1.1 . So whats the reason that this f***ing browser using HTTP1.0? ___ 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] accessing session data error
Hi all: Thanks to Paul Winkler for his FWIW. Thanks a lot to Michael Dunstan for insists in the fact of response.redirect('init2-second-half'), because like he perhaps imagined I do the return init2-second-half instead of redirect. I test with the redirect and the error disapear, for now ; ) Thanks to all the community for establish a support for everyone. Leticia -Original Message- From: Michael Dunstan [EMAIL PROTECTED] To: Leticia Larrosa [EMAIL PROTECTED] Cc: zope@zope.org Date: Wed, 22 Jun 2005 08:55:31 +1200 Subject: Re: [Zope] accessing session data error On 22/06/2005, at 4:50 AM, Leticia Larrosa wrote: Hi: Thanks to Michael Dunstan. I test with the recomendation of Michael but I still get the error. In pages where I get the error, if I wait some seconds and refresh the pages, I obtain the correct information (no get the error). I thinks that the problem maybe are similar to the guess of Michael, but I test breaking up ``init2`` into two scripts and the error don't disappear. :( Any help will be useful. Thanks in advance, Leticia Larrosa Hi Leticia, Just double check that you are redirecting from the init2-first-half to init2-second-half. Using something like the following in init2- first-half:: response.redirect('init2-second-half') rather than directly calling init2-second-half. Cheers Michael ___ 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] Re: Problem with keep-alive timeout
If you really need handle an arbitrary processing time. You might need to separate the request submission from the processing, and the processing from the results display. Roughly the way it would work would be like dropping your laundry off at the cleaners. You bring in the dirty clothes and then get a ticket back and an expected due date. You come back around the due date. Very likely your clothes are ready and when you present the ticket you receive your clean clothes. Occasionally, you get told that due to some sort of delay your clothes aren't ready and you are given a new due date. A similar sort of thing could be done with a long running request. The initial request gets bundled into some sort of job object, and a Job ID is returned and a please wait page. That page can have a delayed redirect to a results page which can take a job ID, determine if it is complete and display the result. Meanwhile, you have an entirely separate process (perhaps run by the Scheduler product http://cvs.zope.org/Products/Scheduler/ that takes jobs, processes them and inserts its results. Of course, I'm leaving off a lot of details here. Off the top of my head, I can think of the following issues that I'm just glossing over. I'm sure there are many more: You don't want job IDs to be easily guessable or forgeable, or people might be able to steal each others laundry. You have to think about what you do when jobs get abandoned, (eventually the clothing racks get full) Finally, (and thankfully one that I don't have a laundry analogy for) you may need to concern yourself with the fact that the Zope user that is doing the job processing is different than the one doing the requesting. ___ 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] ZPT contents slot
John Poltorak wrote: On Tue, Jun 21, 2005 at 04:46:55PM -0500, J Cameron Cooper wrote: John Poltorak wrote: Is 'stxfile' the actual filename? I'm not concerned about it being structured initially - just want to see it working in principle with any file containg some text. It's the name of an object. I made up this name for your structure text file, in each of the folders A B C. You may call it as you will. Note: there is no such thing as a file in the ZODB. Everything is an object. Really? You should try clicking on the drop down menu near the Add button of ZMI. That allows you to create a file ;-)... That's a File, with a capital F. There's a difference. This is how content is viewed. One thing I forgot to mention: you would apply this template (say it's named 'special_view') to your folders, like: http://localhost/A/special_view http://localhost/B/special_view http://localhost/C/special_view Now, if we used a template like this (let's name it 'direct_view'):: divI'm a header/div p tal:replace=structure context/CookedBody This is sample page content /p divI'm a footer/div we could apply it like so:: http://localhost/A/stxfile/direct_view http://localhost/B/stxfile/direct_view http://localhost/C/stxfile/direct_view This is a much more typical pattern, at least for content. If you want to apply a wrapper to page templates, then you use macros. I can't say I understood much of that, but this web page gave me an example of exactly what I wanted to do:- http://www.zopelabs.com/cookbook/1092772190 Here is the code snippet which looks somewhat different to that which you suggested, or is it basically the same? html body !-- assume there is a file or other object containing structured text, and it's called foobar. -- span tal:define=stx python:modules['Products'].PythonScripts.standard.structured_text; the_text here/foobar tal:content=structure python:stx(the_text) The structured text goes here. /span /body /html The problem is finding such examples, but at least in this instance I've learnt something, so thanks for the help. Essentially the same thing, save that you're using a library function to render some text, instead of asking an object to render itself. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.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] Re: Problem with keep-alive timeout
A possible work-around: Set up your web page so that it has two frames: the main frame (visable) invokes the long running zope script; and a secondary (hidden) frame uses a javascript routine (running on a timer) which queries a no-op zope script. This should stop your browser from timing out. Ugly, but it should work. Jonathan - Original Message - From: Andrew Langmead [EMAIL PROTECTED] To: Ralph [EMAIL PROTECTED] Cc: ZopeList List zope@zope.org Sent: Wednesday, June 22, 2005 1:11 PM Subject: Re: [Zope] Re: Problem with keep-alive timeout If you really need handle an arbitrary processing time. You might need to separate the request submission from the processing, and the processing from the results display. Roughly the way it would work would be like dropping your laundry off at the cleaners. You bring in the dirty clothes and then get a ticket back and an expected due date. You come back around the due date. Very likely your clothes are ready and when you present the ticket you receive your clean clothes. Occasionally, you get told that due to some sort of delay your clothes aren't ready and you are given a new due date. A similar sort of thing could be done with a long running request. The initial request gets bundled into some sort of job object, and a Job ID is returned and a please wait page. That page can have a delayed redirect to a results page which can take a job ID, determine if it is complete and display the result. Meanwhile, you have an entirely separate process (perhaps run by the Scheduler product http://cvs.zope.org/Products/Scheduler/ that takes jobs, processes them and inserts its results. Of course, I'm leaving off a lot of details here. Off the top of my head, I can think of the following issues that I'm just glossing over. I'm sure there are many more: You don't want job IDs to be easily guessable or forgeable, or people might be able to steal each others laundry. You have to think about what you do when jobs get abandoned, (eventually the clothing racks get full) Finally, (and thankfully one that I don't have a laundry analogy for) you may need to concern yourself with the fact that the Zope user that is doing the job processing is different than the one doing the requesting. ___ 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] Batch folder creation
Is there any way to create folders in batch? I need to create around 50 but don't fancy doing this manually. -- John ___ 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] Batch folder creation
John Poltorak wrote: Is there any way to create folders in batch? I need to create around 50 but don't fancy doing this manually. John, Put this in a python script and test. for n in range(10): container.manage_addFolder(id= str(n)) 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 )
Re: [Zope] From Zope 2.5.1 to Zope 2.7.6
FWIW, here's the output of the old 2.5.1 install: sprite:/var/lib/zope# grep -rn bobobase_modification_time . Binary file ./var/Data.fs matches grep: ./var/Z2-pcgi.soc: No such device or address ./var/Z2.log:59809:127.0.0.1- - [11/Jun/2002:21:04:53 -0500] GET /Knowledge/search/Indexes/bobobase_modification_time/manage_workspace 200 2489 ./var/Z2.log:59822:127.0.0.1- - [11/Jun/2002:21:05:24 -0500] GET /Knowledge/search/Indexes/bobobase_modification_time/manage_workspace 200 3126 ./var/Z2.log:60034:127.0.0.1 - - [11/Jun/2002:21:22:20 -0500] GET /Knowledge/Catalog/Indexes/bobobase_modification_time/manage_workspace 200 3130 http://knowledge.cait.org/Zope/Knowledge/Catalog/Indexes/manage_main; Mozilla/5.0 Galeon/1.2.3 (X11; Linux i686; U;) Gecko/20020531 Debian/1.2.3-6 ./var/Z2.log:60035:127.0.0.1 - - [11/Jun/2002:21:22:20 -0500] GET /manage_page_style.css 200 2923 http://knowledge.cait.org/Zope/Knowledge/Catalog/Indexes/bobobase_modification_time/manage_workspace; Mozilla/5.0 Galeon/1.2.3 (X11; Linux i686; U;) Gecko/20020531 Debian/1.2.3-6 ./var/Z2.log:76775:127.0.0.1 - - [28/Jun/2002:15:34:45 -0500] GET /manage_page_style.css 200 2923 http://knowledge.cait.org/Zope/Helpdesk/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020610 Debian/1.2.5-1 ./var/Z2.log:76785:127.0.0.1 - - [28/Jun/2002:15:36:14 -0500] POST /Helpdesk/ 200 70659 http://knowledge.cait.org/Zope/Helpdesk/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020610 Debian/1.2.5-1 ./var/Z2.log:76951:127.0.0.1 - - [28/Jun/2002:15:44:12 -0500] GET /manage_page_style.css 200 2923 http://knowledge.cait.org/Zope/Knowledge/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020610 Debian/1.2.5-1 ./var/Z2.log:76952:127.0.0.1 - - [28/Jun/2002:15:44:30 -0500] POST /Knowledge/ 200 230769 http://knowledge.cait.org/Zope/Knowledge/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020610 Debian/1.2.5-1 ./var/Z2.log:170191:127.0.0.1 - - [21/Feb/2003:19:33:04 -0500] GET /manage_page_style.css 200 2923 http://knowledge.cait.org/Zope/Argyle/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) ./var/Z2.log:170192:127.0.0.1 - - [21/Feb/2003:19:33:04 -0500] GET /misc_/OFSP/dtmlmethod.gif 200 1045 http://knowledge.cait.org/Zope/Argyle/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) ./var/Z2.log:170193:127.0.0.1 - - [21/Feb/2003:19:33:04 -0500] GET /misc_/OFSP/Image_icon.gif 200 1079 http://knowledge.cait.org/Zope/Argyle/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) ./var/Z2.log:170194:127.0.0.1 - - [21/Feb/2003:19:33:04 -0500] GET /misc_/ZWiki/ZWikiPage_icon.gif 200 376 http://knowledge.cait.org/Zope/Argyle/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) ./var/Z2.log:170195:127.0.0.1 - - [21/Feb/2003:19:33:15 -0500] POST /Argyle/ 200 27964 http://knowledge.cait.org/Zope/Argyle/manage_main? skey=bobobase_modification_timerkey=bobobase_modification_time Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) So that tells me that there are many dependent on bobobase_modification_time. What does that mean and what do I need to do about it? Thanks much for your assistance; Tim On Wed, 2005-06-22 at 17:33 +0100, Peter Bengtsson wrote: Try something like this: $ cd zopehome/Products/ $ grep -rn bobobase_modification_time . That will tell you if any of your diskbased python products rely on bobobase_modification_time On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: Excuse the newbie question, but how would I find that out? I inherited this 'project' of upgrading Zope and migrating the data. I have had NO help with it so I have been banging through it all the way. Thanks, Tim On Wed, 2005-06-22 at 16:22 +0100, Peter Bengtsson wrote: Are any of your applications relying on the 'bobobase_modification_time' attribute? That's something that changes when you import a .zexp file which could maybe explain why things appear differently now. On 6/22/05, Tim Suter [EMAIL PROTECTED] wrote: I am upgrading our current Zope from 2.5.1 to Zope 2.7.6. I have the new version installed as a different instance on a different server. The Zope 2.5.1 is in tact and what I am wondering is, how do you migrate everything from the older to the newer? I thought exporting the .zexp out of Zope 2.5.1 would be ok.
Re: [Zope] Re: Problem with keep-alive timeout
On Jun 22, 2005, at 1:25 PM, Jonathan wrote:Set up your web page so that it has two frames: the main frame (visable) invokes the long running zope script; and a secondary (hidden) frame uses a _javascript_ routine (running on a timer) which queries a no-op zope script. This should stop your browser from timing out. Ugly, but it should work.I don't think it would. Those two frames would or could be two separate requests. Starting the no-op script is going to have no effect on the entirely separate long running script.When I said "would or could", it is because the exact behavior may depend on circumstances but the end result is the same. If Ralph is truly seeing HTTP 1.0 requests, then of course each connection would be independent and the completion of one request isn't going to reset the timeout for the other. In HTTP 1.1, you can combine multiple requests into a single socket connection, but I still don't think it would help. The way I've seen most browsers implement HTTP 1.1 persistent connections, A connection opened for an initial user request (when the user clicks a link or types a new address into the menu bar.) it send requests for the subordinate elements (the "src=""no-op" request will not be responded to.___ 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: From Zope 2.5.1 to Zope 2.7.6
Tim, subtopics appearing from nowhere could be due to a Zwiki upgrade. If you are indeed looking at a wiki page, the Zwiki release notes and admin guide will explain. Add a false boolean 'show_subtopics' property to the folder to make them go away. ___ 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] TypeError: Cache values must be persistent objects.
Nikko Wolf wrote at 2005-6-21 15:08 -0600: I'm trying to develop a filesystem-based Product (here 'ABCD') and unless I remove the ABCD folder from my Products directory, I get the following error IN THE MANAGEMENT INTERFACE. Is it possible to determine what's causing the problem? After multiple restarts, I did a global Find in the ZMI and (I think) deleted all objects of type ABCD Content. But still the problem persists (no pun intended). ... self._cache[oid] = object TypeError: Cache values must be persistent objects. Looks as if you had changed the class structure: An object that formerly was persistent (when it was stored in the ZODB) now gets a class which is no longer derived from Persistence. Note that the ZODB identifies the class of an object by modulepath, classname. You should ensure that the class identified in this way always derives from Persistence (and that is exists). To find out what object this is, you catch the error and look at object.__class__. ... Module ZODB.Connection, line 227, in _persistent_load - __traceback_info__: ('\x00\x00\x00\x00\x00\x009^', ('Products.ABCD.XML_File', 'XML_File')) TypeError: Cache values must be persistent objects. As we see, catching is not necessary. The traceback is enough ;-) Products.ABCD.XML_File lost its Persistence inheritance... -- Dieter ___ 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] bytecode cache?
Jaroslav Luke-Bš wrote at 2005-6-22 14:51 +0200:-A I have idea about bytecode cache in Zope, it is possible to implement? What I mean: python scripts (in ZODB), DTML documents/methods, ZPT will be bytecode compiled in similar way like ordinary .py scripts into .pyc and then run much faster than noncompiled ZODB objects. I think that it should have significant speed improvement. All of these objects are (in some way) already now byte compiled. But only some of them store the compilation result inside the ZODB (ZODB based DTML objects and PythonScripts do). Thus, on initial access, they need to be compiled. Further access already finds the compiled code and can skip compilation. However, there is potential to reduce startup (!) time by storing the compilation result. That is the purpose of my CompiledExecutables http://www.dieter.handshake.de/pyprojects/zope When you look there, you find a note currently broken. That is because the current version only works with our own slightly modified (fixed :-) ) Zope. It causes an infinite loop when used with a stock Zope. Someone reported the problem and I think I have a fix. I asked the reporter to try it out and report back. But never got an answer... maybe, because my eager spam filter did not like his mail service provider (all providers that relay spam and do not react on my complaints are banned to send me any more emails). If you are interested to take over and check my fix, let me know (it usually is better not to try to contact me privately (-- eager spam filter) but to send Zope related messages and questions to the mailing list). -- Dieter ___ 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] TypeError: Cache values must be persistent objects.
Nikko Wolf wrote at 2005-6-21 16:13 -0600: ... But that begs the questions + why didn't the stack backtrace give the problem ID? It would not have helped: the problem was not an individual instance but a class problem... Your problem is of a rather rare type (few people remove Persistence from the inheritance chain for persistent objects). In general (not in your special case), the id cannot be determined in case of loading problems. More importantly: The error was detected in ZODB, a component used by Zope but also externally. And ZODB cannot expect all its persistent objects to have an id (indeed most, even in Zope, do not!). + if 0x28b5 can be deciphered as an ID, how? Neither this nor your original message tells us what the 0x28b5 should be ;-) It probably is the object's oid (object id), in hexadecimal form. It is useful, to load the object from ZODB in an interactive Python interpreter to analyse the problem more easily (i.e. use pdb.pm to analyse all objects relevant for the exception). + why didn't the Find locate the broken instance? (it *might* be since I've created about 15 different portal_types, and the ABCD Content wasn't really what the offending ID was). Because, it would have died (same exception as reported in your original message) when it had tried to access the object. Do not expect to get realiable results when you did something that prevents objects to be loaded from ZODB ;-) + is this a common problem with file-system (or ZClass) products? Few people remove Persistence from the inheritance chain of a class once they have stored persistent objects of this class in the ZODB... -- Dieter ___ 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 )