Re: [Zope] Squid ESI
I'm reviving this thread from 2006 hoping to hear news about current ESI usage in the Zope community. Has anyone since then had success deploying sites with ESI-enabled caching? Using Squid, Varnish or any other product? Cheers, Luciano On Tue, Jan 31, 2006 at 4:51 AM, Martijn Pieters [EMAIL PROTECTED] wrote: On 1/30/06, Andrew Langmead [EMAIL PROTECTED] wrote: I wasn't involved in the Squid3/ESI work done at boston.com before, so I don't know if there are any issues beyond the ones I resolved in getting things to build. At the time I was involved the implementation came up short of anything useful and was prone to crashing the server. 2 of the bugs I filed at the time are still listed as 'open', and IIRC I didn't get round to filing a bug for everything I found (I communicated those to Robert directly). Here are the open bugs: http://www.squid-cache.org/bugs/show_bug.cgi?id=652 http://www.squid-cache.org/bugs/show_bug.cgi?id=656 -- Martijn Pieters ___ 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] Zope 2.11.0 beta 1 released
On Dec 28, 2007 10:59 AM, Andreas Jung [EMAIL PROTECTED] wrote: * updated to ZODB 3.8 with BLOB support (binary large objects) Great! * transactional MailHost implementation and asynchronous mail delivery Awesome! Supported Python versions: Zope 2.10 requires Python 2.4.3+ (Python 2.4.2 is still acceptable). Older Python versions are no longer supported. Using Python 2.5 is also *unsupported*. Small typo: this should say Zope 2.11 requires Cheers, Luciano ___ 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] Apidoc hangover
Maybe apidoc had too much to drink over Christmas, but right now both the apidoc tool at zope.org and the one in a freshly installed local zopeproject are broken... I guess I should be drinking myself. ISSUE WITH PUBLIC APIDOC --- The public one [1] gives me a The page that you are trying to access is not available when I try to search for an interface. [1] http://apidoc.zope.org/++apidoc++/ Steps to reproduce: 1) visit http://apidoc.zope.org/++apidoc++/ 2) in the top left frame, click on the Interfaces link 3) in the lower left frame, write the name of an interface (or anything, actually) in the search field and hit enter 4) the lower left frame is replaced with a standard Zope 3 error page with the message The page that you are trying to access is not available ISSUE WITH LOCAL APIDOC --- A local Zope 3.4 instance freshly installed with zopeproject 0.4.1 gives me a A system error occurred. in the main (right) frame when I try to browse the source code docs in several ways (but the Book content is OK). Steps to reproduce: 1) visit http://localhost:8080/++apidoc++ 2) in the top left frame, click on the Interfaces link 3) in the lower left frame, write the name of an existing interface in the search field and hit enter (for ex: IPrincipal) 4) click on any of the links displayed in the lower left frame as results of the search 5) the right frame shows A system error occurred. (see traceback at the end of this message). I did a little research on the error, and found this page [2], which may contain an explanation. [2] http://peak.telecommunity.com/DevCenter/PackageNotes If you search that page for not a directory you'll find this: PEAK-0.5a4dev_r2085 peak test fails with an IOError: [Errno 20] Not a directory because RuleDispatch-0.5a0dev_r2083, an egg on which PEAK depends, installs as a zip, and the version of docutils included in PEAK isn't zip module savvy. Unzipping the RuleDispatch egg works around the problem. Is this another symptom of the growing pains as Zope becomes eggified? Cheers, and a great 2008 to all! Luciano %%% [EMAIL PROTECTED]:~/zope3/apidoc8099$ sudo easy_install -U zopeproject Searching for zopeproject Reading http://pypi.python.org/simple/zopeproject/ Best match: zopeproject 0.4.1 Processing zopeproject-0.4.1-py2.4.egg zopeproject 0.4.1 is already the active version in easy-install.pth Installing zopeproject script to /usr/local/bin Using /usr/local/lib/python2.4/site-packages/zopeproject-0.4.1-py2.4.egg Processing dependencies for zopeproject Finished processing dependencies for zopeproject [EMAIL PROTECTED]:~/zope3/apidoc8099$ zopeproject apidoc8099 Enter user (Name of an initial administrator user): admin Enter passwd (Password for the initial administrator user): admin Enter eggs_dir (Location where zc.buildout will look for and place packages) ['/home/luciano/buildout-eggs']: Creating directory ./apidoc8099 Downloading zc.buildout... Invoking zc.buildout... [EMAIL PROTECTED]:~/zope3/apidoc8099$ bin/apidoc8099-ctl fg bin/paster serve deploy.ini -- 2007-12-27T19:49:01 WARNING root Developer mode is enabled: this is a security risk and should NOT be enabled on production servers. Developer mode can be turned off in etc/zope.conf -- 2007-12-27T19:49:04 WARNING ZODB.FileStorage Ignoring index for var/Data.fs Starting server in PID 9546. -- 2007-12-27T19:49:04 INFO paste.httpserver.ThreadPool Cannot use kill_thread_limit as ctypes/killthread is not available serving on http://127.0.0.1:8080 -- 2007-12-27T19:49:24 ERROR SiteError http://localhost:8080/++apidoc++/Interface/zope.app.folder.interfaces.IFolder/index.html Traceback (most recent call last): File /home/luciano/buildout-eggs/tmptsBYNd/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py, line 133, in publish File /home/luciano/buildout-eggs/tmpcOhTFg/zope.app.publication-3.4.2-py2.4.egg/zope/app/publication/zopepublication.py, line 167, in callObject File /home/luciano/buildout-eggs/tmptsBYNd/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py, line 108, in mapply - __traceback_info__: security proxied zope.app.pagetemplate.simpleviewclass.SimpleViewClass from /home/luciano/buildout-eggs/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/ifacemodule/index.pt instance at 0x2c2ba10 File /home/luciano/buildout-eggs/tmptsBYNd/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py, line 114, in debug_call File /home/luciano/buildout-eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/simpleviewclass.py, line 44, in __call__ return self.index(*args, **kw) File /home/luciano/buildout-eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py, line 83, in __call__ return self.im_func(im_self, *args, **kw) File
Re: [Zope] Z Search Interface returns numbers
You missed a step: you must use the Metadata tab of the ZCatalog to define which fields of the indexed objects should be returned with the results from the search. After you do that, you'll have to update the catalog (Advanced tab) and then regenerate your search interface. For instance, to return the ids of the objects, add id as a metadata. If you'd like to show the URL of each item, there is no need to set metadata for that, since the records returned form the catalog have a method called getUrl which gives you that. So you can use record/getUrl, where record is the variable name used in the tal:repeat statement which invokes the catalog search results. Cheers, Luciano On 4/10/07, Peppe Top [EMAIL PROTECTED] wrote: I've diligently followed the tutorial about searching in the Zope book: http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/SearchingZCatalog.stx You basically: - create a ZCatalog object - create a Lexicon and an Index - finding objects and cataloging them - create a web interface (with Z Search Interface) to search the ZCatalog. When I search something in the SearchForm (via the test tab) I just get numbers. I mean the ReportForm correctly reports the objects containing the searched string, but lists handles (I guess). Is this normal? What can I do in order to get something like: /Zoo/Serpents /Zoo/Reptiles (the above are imaginary DTML documents matching the search criteria, and their path to ZODB root) instead of: 4567489 4567480 ??? Thanks a lot -- Peppe (Plone 2.1.2, Zope 2.8.7, Python 2.3.5, Red Hat 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 ) ___ 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] Zope and OAI-PMH
I've been assigned to integrate an existing academic portal in Plone with the OAI-PMH protocol as a data provider. Searching through this list I found the message below, but no response. On 2/4/05, Yuri [EMAIL PROTECTED] wrote: There are several (at least two...) products to manage OAI with Zope. Can someone share his experiences in this list? Thanks :) The products I've found were: - OAI Pack from Infrae http://www.infrae.com/products/oaipack - ZOpenArchives from Pentila http://www.pentila.com/produits/ZOpenArchives Is anyone here using these (or other) products to implement OAI in Zope or Plone? Which is the more actively supported product? Cheers, Luciano ___ 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] Object DB versus Relational DB
ZODB with Data.fs is optimized to fetch data. Inserts or updates have a lot of overhead. It's the price we pay for the excellent versioning features. Therefore, when the are many we have been avoinding ZODB even when the problem domain calls for an OODB We have implemented a highly hierarchical database for a Yahoo-like directory using a recipe found in the book SQL for Smarties, by Joe Celko, ISBN 1-55860-323-9 (see Chapter 26 - Trees). Celko's solutions allow for a hierarchy with unlimited levels and, amazingly, it does not require sub-selects or any other construct unsupported by MySQL. The rest of the book is filled with solutions to problems that test the limits of the relational database model. Best regards, Luciano Ramalho Tom Deprez wrote: A starting point is http://www.zope.org/Members/anthony/sql_vs_ZODB Reading this text is exactly the problem I'm having. Unfortunately, it doesn't give much examples. I hope somebody can give me some answers on my question : The problem I'm facing is the following. I've got a lot parent-child relationships - OODB But, I also need to perform some queries on these records and link some to each other - more RDB. I'm not sure which way to follow. A hybrid solution isn't the best one, I think, because then you do twice the same work. ie. You've to create the parent-child relationship in the OODB (the site structure) and in the RDB (to perform correct queries). The RDB solution is possible, but since I need lots of parent-child relationships not the best one. The OODB is probably the best. However, this implies several implementation problems I don't know how to solve at the moment. Can somebody elaborate on the following questions? Thanks in advance. Assume the following : Group1 SubGroup1 SubGroupA Problem1 Examination1 Equipment1 Paremeters Equipment2 Parameters Examination2 Campus1 Room1 Equipment1 Equipment2 Room2 Now, if a person is creating a new equipment in Examination2. How can I show it all the avalailable equipments in Campus1? So this person can choose from it and create it in the examination2 folder? In an OODB environment? If a person is browsing in Room1 and wants to get all the examinations which will be performed on Equipment1. How do I create such a query in OODB? (Or even further, the person wants to see all the examinations done on equipment1, but only with Group=Group1 and SubGroup=SubGroup1 How can this be done in Zope? Thanks in advance, Tom. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] type in python methods
The instruction "if type(var1) == type(var2): " doesn't work. It does work: - Python 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam x = 'spam' y = 'eggs' z = 99 type(x) == type(y) 1 type(x) == type(z) 0 - How isn't it working for you? What is the context? What kinds of variables are you trying to compare? Are you aware that type() only knows about primitive types (for example, all class instances are of type 'instance')? Regards, Luciano Ramalho Juan Carlos Corua wrote: How can I compare the type of 2 variables in a python method? The instruction "if type(var1) == type(var2): " doesn't work. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope vs. Enhydra
You may be interested to know that the HiperDOM project, currently in development by DC and my company, aims ot bring to Zope a template system similar to the XMLC of Enhydra. Check it out: http://www.zope.org/Members/mj/HiperDom In my opinion, you really can't compare Enhydra with Zope. Enhydra is exclusively a programmers tool. Zope, through it's friendly UI, enables you to delegate many maintenance activities to end-users, where they belong. Regards, Luciano Ramalho Hiperlogica Sao Paulo - Brazil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Not like ASP complaint - any good answers
Intermingling application logic with HTML code is a good idea if these conditions are met: 1) your website logic and its graphic design always change in sync; 2) you have more real programmers than HTML coders; 3) your programmers´ workload is so light that you don´t care about reusing code; Unfortunately, in the real world it seems these conditions never exist. Best regards, Luciano Ramalho Sean McGrath wrote: All, I have had a number of e-mails from developers using Microsoft ASP in recent days. The paraphrased consensus in the e-mails is that the external methods/python methods approach to mixing markup with code in Zope is more clunky than in ASP where you can intermingle the two at will. Has anyone written anything on this topic I could point them to? regards, Sean http://www.pyxie.org - an Open Source XML Processing library for Python ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Reversing acquisition?
Thank you very much for the correction. However, after checking your Wiki references, I must say I still don´t understand the difference between context and containment (these are words that I naively used as synonyms in my message). In http://www.zope.org/Wikis/zope-dev/AcquisitionUsage we find: """ - Containment: Search the object, then its container, then the container's container, and so on. Ignore objects not in this chain. - Context: Search the objects in precisely the reverse of the order in which they were mentioned, so "A.B.C.D" is always searched in the order "D", "C", "B", "A". """ But for me, A.B.C.D means that A contains B; B contains C; and C contains D, so I don´t see the difference from the first definition. Maybe you are using the word "container" in a more restricted sense? Best regards, Luciano Ramalho Stephen Harrison wrote: Luciano Ramalho wrote: [EMAIL PROTECTED] wrote: The effect I would like to achieve is: when user access http://myserver/, content of /text_object_1 and /text_object_2 will be shown while user access http://myserver/subfolder/, content of /subfolder/text_object_1 and /subfolder/text_object_2 The point is that there's no index_html in /subfolder so /index_html will be acquested and by default it displays content of /text_object_1 and /text_object_2 The question is: we got text_object_1 and text_object_2 in /subfolder how could I let the acquested index_html in subfolder to use the objects inside the subfolder? What you want is what Zope already does! That is how acquisition works: if /subfolder has no index_html, it will acquire that object from the root. But the DTML inside index_html will be rendered in the context (namespace) of the subfolder, so the desired effect will be achieved. Unfortunately it is not quite as simple as that. Infact, to say that that is how acquisition works is misleading. It is not how acquisition works, but if you are using DTML Methods then you can create the effect of that being the way it works. Let me explain. When you acquire an object, the acquisition method used is to first look at the containment of the object before the context of the object. So if you have the scenario described above, when you call /subfolder/ it fist looks for index_html inside subfolder, but it isn't there, so it looks in subfolders containing object, /, where it does find index_html. Now it executes index_html and finds a call to text_object_1. So it first looks inside index_html for text_object_1, but it can't find it, so it looks in the _containing_ object of index_html, /, and finds text_object_1. However, if index_html is a DTML Method then things are different, because a DTML Method does not have it's own namespace and isn't an object in it's own right - rather it is a method of the calling object. The problem with this *containment before context* is that in most cases it goes against what is trying to be achieved. In the example above, there may be very good reasons why index_html needs to be a document rather than a method - maybe it needs it's own properties, etc. The point is that most often, the important thing when calling an object is the *context* in which it is called, not the location in the object store where it happens to be located. As I have mentioned several times now on the list, I can't see any good reason why acquisition should use the containment before context method (refered to as Simplified Acquisition) and in my opinion it should be changed to use context before containment (refered to as Natural Acquisition). See http://www.zope.org/Wikis/zope-dev/AcquisitionUsage for some explanation of the different types of acquisiton, and http://www.zope.org/Wikis/zope-dev/AcquisitionFeedback for a summary of the problem as I see it - if you have opinions then do add them. Also, Patrick Lewis wrote: Try changing /index_html as follows: dtml-var standard_html_header table trtddtml-var "PARENTS[0].text_object_1" fmt=structured-text /td/tr trtddtml-var "PARENTS[0].text_object_2" fmt=structured-text /td/tr /table dtml-var standard_html_footer Basically force Zope to look in the current folder first. That is all well and good for solving this particular problem, but it crosses a threshold in terms of accessability to the person writing the code. For a 'non-programmer', writing dtml-var object is not too difficult or scary, but dtml-var "PARENTS[0].object" is a world apart and quite a scary place to be. It's complicated, it doesn't make a lot of sense and it makes doing what should be quite simple things inaccessible. I work with a variety of people here, some of whom have no problem at all with any of the above, but others for whom there is a definite bar
Re: [Zope] Reversing acquisition?
[EMAIL PROTECTED] wrote: The effect I would like to achieve is: when user access http://myserver/, content of /text_object_1 and /text_object_2 will be shown while user access http://myserver/subfolder/, content of /subfolder/text_object_1 and /subfolder/text_object_2 The point is that there's no index_html in /subfolder so /index_html will be acquested and by default it displays content of /text_object_1 and /text_object_2 The question is: we got text_object_1 and text_object_2 in /subfolder how could I let the acquested index_html in subfolder to use the objects inside the subfolder? What you want is what Zope already does! That is how acquisition works: if /subfolder has no index_html, it will acquire that object from the root. But the DTML inside index_html will be rendered in the context (namespace) of the subfolder, so the desired effect will be achieved. Regards, Luciano Ramalho ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )