Re: [Zope-dev] Externalize or Adapt? (ZPatterns)
Mike wrote: I will add a "retrieveItem" method to the Specialist which, instead of accessing a rack in the local specialist (the default implementation), it will instead call (for example) SkyDivers.getItem(). Thus, when you call Customers.getItem(), you will actually get an object from the SkyDivers specialist. In other words, I make the horizontal domain specialist delegate to the vertical specialist. Maybe the best way is to put a 'thumb' data source into Customers instead of native one. This thumb should translate all messages to SkyDivers' data source. I'm just considering on specialized racks which implement non-standard api, such as 'findItem( criteria)', 'itemValues()' or something similar. By the way, racks should have a kind of 'scanning' api, like Zope's Folders, at least they should have itemIds() method. Mike ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Externalize or Adapt? (ZPatterns)
At 06:31 PM 6/10/00 +0800, Mike wrote: Maybe the best way is to put a 'thumb' data source into Customers instead of native one. This thumb should translate all messages to SkyDivers' data source. Yes, a "Delegation Rack" is certainly possible. It would make it really easy to merge data from different specialists; just drop in more than one. I suppose you could even make the DelegationRack have an expression to use to translate from the ID asked for in the horizontal specialist, to the kind of ID used by the vertical specialist, perhaps by using a search function of the vertical specialist. I'm just considering on specialized racks which implement non-standard api, such as 'findItem( criteria)', 'itemValues()' or something similar. By the way, racks should have a kind of 'scanning' api, like Zope's Folders, at least they should have itemIds() method. This is waiting for indexes and predicates; which won't hit until 0.5.0. Meanwhile, I'll add a getPersistentItemIDs() method to Rack in 0.4.0. This will not get you the id of all possible items in the rack, since you might be using SQL or some other kind of storage. It will only get the items which have data or propertysheets in the ZODB. Currently, the correct way to have 'scanning' API's is to implement them on your Methods tab using SQL methods, LDAP methods, or whatever is appropriate for your dataset. In 0.5.0 or later, hopefully there'll be some sort of plug-in API for that. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope] logout
Hi James, James Cummings wrote: Ok, since I haven't found this by searching the site or the mailing list archive, is it possible to logout as superuser? I would like to be able to login as a different user, but I haven't been able to find out how to do this. often prependig the url with the new user like this: http://newuser@site/... logs you out and in as the new user. But this behavior is not defined as in rfc. HTH Tino Wildenhain ___ 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] Re: dtml-tree with data from multiple tables
Hi Lance, Lance Kurisaki wrote: I'd like to generate a tree with data from different SQL tables depending on the tree level. In other words, the first level data comes from one table, second level comes from another. How can the branches_expr expression determine what the current tree level is? Can I pass a parameter to let me know the current level? I tried the following, but it didn't work... dtml-tree id=name branches_expr="child_lookup(_['tree-level'])" I think Anthony baxter's "Some neat tricks with dtml-tree" url: http://www.zope.org/Members/anthony/tree-coding-tricks will help you out That How-To uses the same SQL table to define children at all levels of the tree. How can I use different tables at different levels? Am I able to determine the current level in my child_lookup() method? I used a trick to archive this: each of my tables has a number as key. dtml-tree needs a unique id for lookup. So to make it unique, I add an offset to each tables key and remove it for query. My query is kind of self modifying for this, comparing if the key is inside a given interval and making the query at the appropriate table with removing the offset first and adding the next offset to the results. I can provide an example, if you wish. Regards Tino Wildenhain ___ 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] [Ann] Zope 2.1.6: dtml-in patchIt provides complete batching info at sequence start *and* end It provides complete batching info at sequence start *and* end
The Zope 2.1.6 dtml-in provides batching information for the previous batch at the start and end of the sequence. Batching information for the following batch, however, is only available at sequence end. This makes it difficult to provide uniform navigation (to previous/next batch) both before and after the sequence. Moreover, if the current batch size is "1" (e.g. size=1), then dtml-in provides batch info for the following batch only for the sequence's first element. For all other elements only previous batch information but no following batch information is available. This is a bug. dtml-in provides modes "previous" and "next" that do not render the sequence but only provide the respective batching info. The problem with this solution is redundancy: the same parameters must be given to "dtml-in previous", "dtml-in" and "dtml-in next" to obtain reliable information. This is error prone and makes it difficult to separate navigation (for different sequences with different dtml-in parameters) in a general navigation method. The patch at URL:http:www.handshake.de/~dieter/pyprojects/zope/dt_in.pat provides uniform batching information both at the start and at the end of the sequence. A batch size of 1 is correctly handled. Dieter ___ 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] [Ann] Zope 2.1.6: dtml-in patch It provides complete batching info at sequence start *and* end It provides complete batching info at sequence start *and* end
On Sat, Jun 10, 2000 at 12:57:10PM +0200, Dieter Maurer wrote: The Zope 2.1.6 dtml-in provides batching information for the previous batch at the start and end of the sequence. Batching information for the following batch, however, is only available at sequence end. This makes it difficult to provide uniform navigation (to previous/next batch) both before and after the sequence. Moreover, if the current batch size is "1" (e.g. size=1), then dtml-in provides batch info for the following batch only for the sequence's first element. For all other elements only previous batch information but no following batch information is available. This is a bug. dtml-in provides modes "previous" and "next" that do not render the sequence but only provide the respective batching info. The problem with this solution is redundancy: the same parameters must be given to "dtml-in previous", "dtml-in" and "dtml-in next" to obtain reliable information. This is error prone and makes it difficult to separate navigation (for different sequences with different dtml-in parameters) in a general navigation method. The patch at URL:http:www.handshake.de/~dieter/pyprojects/zope/dt_in.pat provides uniform batching information both at the start and at the end of the sequence. A batch size of 1 is correctly handled. Hi Dieter, Could you put your patch into the Collector? http://classic.zope.org:8080/Collector This way we will not forget about your fix. Thanks! -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] ZEO ..again ;)
Bill Anderson wrote: OK, after reveiwing the ZEO FAQ, I realized that we seem to be a few weeks behind schedule. Is there any updates on a time frame? I know this would certainly help amk out with his project, and would certainly help me out, even in non-zope apps (I am working on moving a Sybase/Zope setup to straight ZODB with ZEO, but can't get an approval until we at least have an idea of when we can try the code). Half-working code would be fine for me, but last I heard the early-testers indicated it was definitely releasable. :) OK, here's as much of the scoop that I know, having been on the Left Coast for a week. It's true, we should have made the first public development release by now. We were working on adding multiplexing of the protocol, and it got mostly done before we had to work on other things. We should just back off of the changes, release what we have, and bring multiplexing back in later. Thanks to Greg Ward and Andrew Kuchling, who during testing ZEO helped Jim get something like an order of magnitude speed improvement in ZEO. Mmm, yummy! One other thing. Jim brought in a professor that teaches distributed databases, and it looks like replicating on the storage server (in an atomic way) might be reasonable. It's not on our radar right now, but something to keep in mind. --Paul ___ 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] Problems extracting property type from a ZClass?
I'm trying to automatically extract the property names, types and default values from the propertysheet of a class. I'm being foiled by the following bit of strangeness. Consider the following snippet of DTML: dtml-in "propertyIds()" dtml-let pid="_['sequence-item']" dtml-var pid dtml-var "getProperty(pid)" dtml-var "getPropertyType(pid)"br /dtml-let /dtml-in When run in a "normal" location (ie., outside of the Products hierarchy), it acts as expected giving a list of properties, values *and* their type. E.g., title Zope string selectionChoices ['selection1', 'selection2'] lines date_prop 2000/01/01 date However, wrapped in a dtml-with "Control_Panel.Products.TestProduct.TestClass.propertysheets.common.properti es" /dtml-with, I'm getting the name and value, but not the type, viz. p_string test_string None p_date 2000/01/01 None p_boolean on None p_float 3.1415 None p_int 10023 None p_lines ['line1', 'line2', 'line3'] None p_text this is a test entry of a text box. None p_tokens ['token1,token2,token3'] None p_selection None p_multi_selection None Any ideas? Cheers, Darran. ___ 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] Traversable DTML methods
It seems strange to me that SQLMethods are traversable out of the box and "normal" DTML methods are not. It seems to me that traversable DTML methods would be useful (to me this means DTML Methods with parameters). Is this something that might make it into Zope in the future or am I missing something important which means that they simply arn't necessary? - Ian Sparks. ___ 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] ZCatalog in python
I'm in a similar situation with Aaron, except my product is mostly python. I emulated the cataloging in the PortalCatalog method, but left out the permission check. When my product is added to a folder, the catalog gets created, and has the indexes I set up. I can create a zsearchinterface, and search/find the instance of my product, but none of the data that exists below that. Do my sub-objects need to inherit from any zope classes in order to get indexed? I know the Zclasses do this automatically, what's the majick trick for this in python? I have tried, catalogAwareness, index_object at item creation, and reindex_object at item edit. none of these seem to do it, I imagine because the catalog wants them to be a certain type, and they're not. Any ideas? ___ 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] error (200)
Hello all, My Zope (2.1.6) installation has just become *very* unstable. My most recent addition has been ZPatterns and LoginManager. My passwords for my virtual sites (using SiteRoot) are no longer accessable by my account and superuser can't access them. The site "disappears" three or four times a day without errors. And clicking on Product Management link sometimes returns "No Data" notice in the browser and then Zope crashes. This is the error that shows up on the console when going to Product Management or accessing the subdir that holds the subdir that has LoginManager: date ERROR (200) ZODB Couldn't Load State for '\000\000\000\000\000\000\002\017' I'm exporting the sites now and am going to (I guess) re-install zope and all of the products. 8-/ Are there any other options? Any ideas on what went wrong? Is their a way to fix a corruption in the ZODB? TIA -- Mike Mikkelsen [EMAIL PROTECTED] Micro Business Systems http://www.microbsys.com Fresno Linux Users Grouphttp://linux.fresno.ca.us It's all GNU to me! ___ 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] error (200)
On Sat, Jun 10, 2000 at 09:47:54AM -0700, Mike Mikkelsen wrote: My Zope (2.1.6) installation has just become *very* unstable. My most recent addition has been ZPatterns and LoginManager. My passwords for my virtual sites (using SiteRoot) are no longer accessable by my account and superuser can't access them. The site "disappears" three or four times a day without errors. And clicking on Product Management link sometimes returns "No Data" notice in the browser and then Zope crashes. This is the error that shows up on the console when going to Product Management or accessing the subdir that holds the subdir that has LoginManager: date ERROR (200) ZODB Couldn't Load State for '\000\000\000\000\000\000\002\017' I'm exporting the sites now and am going to (I guess) re-install zope and all of the products. 8-/ Are there any other options? Any ideas on what went wrong? Is their a way to fix a corruption in the ZODB? Have a look at Ty Sarna's Tranalyzer: http://www.zope.org/Members/tsarna/Tranalyzer which can tell you where your Data.fs is in trouble. You then can try and repair your Data.fs file by truncating the file at the point of corruption. For more details see the Disaster Recovery + Avoidance How-To at: http://www.zope.org/Members/vernier/recovery -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] load-balancing recommendations ? (configuration and hardware)
+[ chas ]- | | | ps. In the past I've got around this by ensuring that if the | very first request from a given browser is dealt with by, say, | server silo8.domain.com, then all subsequent requests from that | browser are also dealt with by by that server. But that | (a) introduces head-aches with application logic and (b) is | not good if silo8.domain.com suddenly goes down. pps. If you use sessions that are not distributed (i.e. in memory), this is the setup you need. It is a royal pain (thinking IIS + ASP here more than anything) -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ 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] Exceptions and XMPRPC
I'm using XMLRPC and Zope for prototyping an application in python. And for the most part, things are VERY easy to accomplish. But I sometimes run into troubles with error handling. It's fairly easy to make a slight mistake in an external python method which takes a fair amount of effort to debug. Or at least for me it's a fair amount. I just might not be using any of the debugging features of Zope. I guess that the heart of my question is this: has anyone done any work to extend the XMLRPC python module and the XMLRPC code in Zope to catch exceptions, convert them to be sent back over the network and then raise them in the scope of the client code? In looking through the XMLRPC code I don't see anything too obvious, but it could just be that I'm getting tired. Thanks! -- Peter Kropf Codesmith VEReCOMM Corp. 2475 Augustine Drive, Suite 102 Santa Clara, CA 95054 408-919-3107; Fax 408-969-0688 [EMAIL PROTECTED] ___ 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] closed Portal
I just downloaded and installed the latest checkout from the PTK for the first time. It seems that if I want to have a closed Portal, I can't use Zope's authentication mechanisms to allow users into the folder that contains the Portal as the Portal then complains that the user has already been authenticated outside the Portal. Is that correct? -- Regards, Graham Chiu gchiuatcompkarori.co.nz http://www.compkarori.co.nz/index.php Powered by Interbase and Zope ___ 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 w/ FreeBSD 4.
+[ Jason C. Leach ]- | hi, | | I would do with a hand getting zope working w/ FreeBSD 4. I make it by | going to the /usr/ports, and why I try and start it with './start' I get | the errors at the end of this msg. Don't use it out of ports. For some reason it decides positively absolutely that you require Apache to run Zope, and makes a lot of assumptions about Zope (since the port-maintainer seems to still run 2.2.8, Thomas have you upgraded in recent history?). go into /usr/ports/distfiles/ and unpack the Zope-2.1.6-src.tgz file somewhere else. type python ./w_pcgi.py (for pcgi support). or python ./wo_pcgi.py (for stand-alone). | su-2.03# ./start | Traceback (innermost last): | File "/usr/local/www/Zope-2.1.6/z2.py", line 493, in ? | logger_object=lg) | File "/usr/local/www/Zope-2.1.6/ZServer/medusa/http_server.py", line | 552, in __init__ | self.bind ((ip, port)) | File "/usr/local/www/Zope-2.1.6/ZServer/medusa/asyncore.py", line 205, | in bind | return self.socket.bind (addr) | socket.error: servname not supported for ai_socktype | su-2.03# Since you're running it as root, make sure that the directory and all the files are owned by nobody:nobody Make sure your python is up to date as well. Make sure your 4.0 is recent-ish (like 4.0-RELEASE or younger, not a pre-2000 snapshot). -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ 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] Re: dtml-tree with data from multiple tables
Thanks for the hint! A small example would be nice, if it's not too much trouble! Lance -Original Message- From: Tino Wildenhain [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 10, 2000 2:26 AM To: Lance Kurisaki Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Re: dtml-tree with data from multiple tables Hi Lance, Lance Kurisaki wrote: I'd like to generate a tree with data from different SQL tables depending on the tree level. In other words, the first level data comes from one table, second level comes from another. How can the branches_expr expression determine what the current tree level is? Can I pass a parameter to let me know the current level? I tried the following, but it didn't work... dtml-tree id=name branches_expr="child_lookup(_['tree-level'])" I think Anthony baxter's "Some neat tricks with dtml-tree" url: http://www.zope.org/Members/anthony/tree-coding-tricks will help you out That How-To uses the same SQL table to define children at all levels of the tree. How can I use different tables at different levels? Am I able to determine the current level in my child_lookup() method? I used a trick to archive this: each of my tables has a number as key. dtml-tree needs a unique id for lookup. So to make it unique, I add an offset to each tables key and remove it for query. My query is kind of self modifying for this, comparing if the key is inside a given interval and making the query at the appropriate table with removing the offset first and adding the next offset to the results. I can provide an example, if you wish. Regards Tino Wildenhain __ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com ___ 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] load-balancing recommendations ? (configuration and hardware)
chas wrote I've often heard about the infinite-scalability that will be created by something like ZEO and I've always wondered about one thing : how is the load-balancing being done ? There's a number of approaches you can take here: 1. Buy something - a cisco localdirector, an arrowpoint (also now owned by cisco), or similar. This is the approach we take - in a past life I've seen an LD get the absolute crap kicked out of it and it just kept working (it was in front of some _large_ proxy caches). www.cisco.com www.arrowpoint.com 2. Software - there's linux virtual server, there's eddieware, there's probably a bunch of commercial packages as well, although I don't know why you'd bother... www.linuxvirtualserver.org www.eddieware.org Which of these solutions you go for largely depends on your budget - the first set of options are probably more robust and flexible, but the latter is definately going to be cheaper :) Anthony -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ 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] Traversable DTML methods
Use a pythonmethod with the traverse_subpath argument... Anthony "Ian Sparks" wrote It seems strange to me that SQLMethods are traversable out of the box and "normal" DTML methods are not. It seems to me that traversable DTML methods would be useful (to me this means DTML Methods with parameters). Is this something that might make it into Zope in the future or am I missing something important which means that they simply arn't necessary? - Ian Sparks. ___ 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 ) -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ 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 )