Re: [Zope-dev] case insensitive sorts
Shane Hathaway wrote: Python's sort() lets you sort based on not only strings but also tuples, lists, and numbers, which is a very useful feature. Thus sort() is intended to be a highly generalized method. It is useful but not ideal for sorting text strings. What you *really* want is a second method, perhaps in a new module (called "textops" or something similar) that would also include multilingual text splitters and other utilities for working with human-readable text. I agree that's a good idea, but all I'm talking about is the simple case of sorting strings, in which python's current implementation isn't very helpful and I don't see any situation where sorting: Andrew David Wayne bart sophie is better than sorting: Andrew bart David sophie Wayne cheers, Chris ___ 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] case insensitive sorts
Dieter Maurer wrote: Chris Withers writes: Dieter Maurer wrote: Andy McKay writes: what does anyone else think I would not like it. Why not? ;-) I would not like to see this sort order in the management screens, because I use capitalization to ensure that essential objects are at the top of the object list. Hmmm... that's like saying you'd rather not have a memory leak fixed because it gives you an excuse to buy more RAM ;-) *grinz* Chris ___ 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] case insensitive sorts
Toby Dickenson wrote: (reasons of course would be helpful, particularly if you want it to stay like it is ;-) I noticed the smiley, so Im not sure how serious the suggestion is. It was serious, the smiley was 'cos I couldn't understand why anyone would want it to stay like it is :-) 1. Python doesnt distinguish between 8-bit-strings and byte arrays. (for example, ZODB uses 8-byte-long 'strings' as oids). Do you want a casewise sort for byte arrays too? I don't know. Show me why this is bad :-) 2. 'sort' uses 'cmp'; so effectively you are asking for string's cmp to be case insensitve. Can you demonstrate a case-sensitive collation function that is as simple as your case-insensitive one: def _default_sort(x,y): return cmp(string.lower(x),string.lower(y)) I see your point. I guess cmp is implemented in C? How about a third optional argument? def _case_sensitive_sort(x,y): return cmp(x,y,string.CASE_SENSITIVE) def _default_sort(x,y): return cmp(x,y) 3. ZCatalog stores objects in a pre-sorted order. Changing the sort order of any object (not just strings) would break *all* existing ZCatalog instances that store mixed case strings. (and other applications too - the python language reference documents that this assmption is safe at least until python3k) Sorry, don't qutie follow this... explanation for a simpleton? ;-) cheers, Chris ___ 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] Conflict Errors
Chris Withers writes: However, if anyone does know what constitutes a 'seperate object' in ZODB terms, it be really useful to know. I'm guessing a class which inherits from Persistent? Dictionaries don't, 'cos they're python builtins, which I'm pretty certain was the problem in my case... This has recently been answered in the list. Here a short summary: a persistent object with all its attributes. If the attribute is itself a persistent object, then the "separate" object contains only a reference to it. Otherwise, the complete attribute value (until persistent objects are hit) is part of the object's value. Dieter ___ 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] case insensitive sorts
Dieter Maurer wrote: Chris Withers writes: Dieter Maurer wrote: Andy McKay writes: what does anyone else think I would not like it. Why not? ;-) I would not like to see this sort order in the management screens, because I use capitalization to ensure that essential objects are at the top of the object list. Hmmm... that's like saying you'd rather not have a memory leak fixed because it gives you an excuse to buy more RAM ;-) *grinz* Chris I would have said its like saying your not going to fix the hole in your water pipe because you use it to fill up your kettle without getting out of bed, and if you fixed it then you would have to walk to the sink. :-) Needless to say I agree with Chris. -Andy ___ 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] Acquisition wishlist :-)
Jim Fulton wrote: I'm inclined to think that in some future version of Zope, we should switch to making explicit acquisition the norm. Well, implicit is good when you're starting, but can cause fun with security later. Hmmm, I guess I like the way it is but my wishlist (damn, Christmas just gone ;-) would be: for Acquisiton.Implicit, be able to do something like: class MyClass (Acquisition.Implicit): acquisition = ClassAcquisitionInfo() acquisition.donotacquire('index_html') and, likewise, for Acquisition.Explicit, to be able to to something like: class MyClass (Acquisition.Explicit): acquisition = ClassAcquisitionInfo() acquisition.acquire('index_html') acquisition.acquire('fred') ...of course, you may be able to do this already in some way. What do people think? cheers, Chris ___ 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 )
[Zope-dev] Re: Starting ZServer
Hi guys, This is my first entry to this mailing list and please forgive me if u feel this a stupid problem to begin with.(Today happens to be my first day on ZServer) My Zserver has started at 8080 but the manage.dtml is not accessible from the browser either as localhost or with the host name. Please suggest me an answer the problem ASAP. Thanx. _ Tired of limited space on Yahoo and Hotmail? Free 100 Meg email account available at http://www.dacafe.com ___ 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] dynamic permissions in zope
Heinz-Josef Claes writes: dynamic permissions It is not Zope's normal behaviour. Of cause, you could plug in a new UserFolder that implements the features you require (someone else recommended "LoginManager"). On the other hand, Zope is flexible enough to let you approximate the desired behaviour - at the expense of a bit extra work: You create a folder like ZClass for your documents. Each document goes into its own ZInstance. You ensure, that the document is not accessible directly. You give your ZClass a method "index_html". It performs your application specific security checking. If the check succeeds, it renders the document. You may need to set a proxy role for your "index_html" be able to render the document. This approach is only an approximation. It looses the fine grained permission checking during the rendering of your document. Dieter ___ 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] case insensitive sorts
See below (nothing earth shattering tho) ;) - Original Message - From: "Chris Withers" [EMAIL PROTECTED] To: "Shane Hathaway" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, January 03, 2001 10:58 AM Subject: Re: [Zope-dev] case insensitive sorts Shane Hathaway wrote: Python's sort() lets you sort based on not only strings but also tuples, lists, and numbers, which is a very useful feature. Thus sort() is intended to be a highly generalized method. It is useful but not ideal for sorting text strings. What you *really* want is a second method, perhaps in a new module (called "textops" or something similar) that would also include multilingual text splitters and other utilities for working with human-readable text. I agree that's a good idea, but all I'm talking about is the simple case of sorting strings, in which python's current implementation isn't very helpful and I don't see any situation where sorting: Andrew David Wayne bart sophie is better than sorting: Andrew bart David sophie Wayne That's only because you use NT (ach spit). ;) cheers, Chris ___ 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 ) ___ 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] case insensitive sorts
Andrew David Wayne bart sophie is better than sorting: Andrew bart David sophie Wayne That's only because you use NT (ach spit). ;) Thats not actually true. It is how python behaves on WinNt, Win9X, Linux, etc (I have tested this) -Andy ___ 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] Re: Starting ZServer
http://127.0.0.1:8080/ if that works then check out your /etc/hosts file or equiv On Thu, 04 Jan 2001, [EMAIL PROTECTED] wrote: Hi guys, This is my first entry to this mailing list and please forgive me if u feel this a stupid problem to begin with.(Today happens to be my first day on ZServer) My Zserver has started at 8080 but the manage.dtml is not accessible from the browser either as localhost or with the host name. Please suggest me an answer the problem ASAP. Thanx. _ Tired of limited space on Yahoo and Hotmail? Free 100 Meg email account available at http://www.dacafe.com ___ 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 ) -- ___ 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] [ZPatterns] DataSkin and Zope Security
"Phillip J. Eby" wrote: DataSkins stored in Racks do not participate in the Zope ownership mechanism, nor the creation of the 'Owner' role. This is because they are not being stored via the normal ObjectManager protocols. Hurm... to what extent do they participate in Zope's Security Mechanisms? cheers, Chris ___ 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 )
[Zope-dev] AppTabs
Ty Sarna wrote: AppTabs[4] [4] Unreleased product, still in some flux. It mainly provides fancier, more flexible version of Zope's management tabs, suitable for use in an application (that is, suitable for exposing to users, not just developers). It also has some local roles hooks as mentioned. Ooo sounds very cool... any chance of a release? I had a proposal on dev.zope.org for something similar (Multi-Row Manage Tabs, I think, but it was a while back :-S) cheers, Chris ___ 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] RE: objectIds accessiblilty and a proposal
Steve Alexander wrote: On a related issue, what about other dtml snippets that people generally don't want as web accessible, such as standard_html_header ? On my pie-in-the-sky zope wishlist: snip wishlist I did have a proposal for just this on dev.zope.org, but I see someone has deleted it :-( cheers, Chris ___ 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] RE: objectIds accessiblilty and a proposal
Dieter Maurer wrote: There are objects, that should be usable by Anonymous inside DTML but should not be viewable over the web (as they will only confuse). All page components (such as "standard_html_header/footer") fall into this category. Totally agree... this has bugged em right since I started usign Zope! :-S cheers, Chris ___ 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] case insensitive sorts
Your analogies imply that this behavior is a bug or an unintended flaw in the design. I would argue that it is intentional. Unix file systems work the same way. Try doing an "ls" with mixed case files and you'll see what I mean. It isn't a flaw. It seems as though it was overlooked. The sort on text works by sorting the data by its ascii value. Capital letters have a lower ascii value than lower case letters. i.e. A-Z = 65 - 90 a-z = 97 - 122 The arguement is that the sort should probably go AaBbCcDdEeFf.etc -Andy ___ 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] case insensitive sorts
Andy Dawkins wrote: Your analogies imply that this behavior is a bug or an unintended flaw in the design. I would argue that it is intentional. Unix file systems work the same way. Try doing an "ls" with mixed case files and you'll see what I mean. It isn't a flaw. It seems as though it was overlooked. The sort on text works by sorting the data by its ascii value. Capital letters have a lower ascii value than lower case letters. i.e. A-Z = 65 - 90 a-z = 97 - 122 The arguement is that the sort should probably go AaBbCcDdEeFf.etc -Andy My point is that the sorting is intentionally Unix-like and case sensitive on purpose. Not due to laziness. But, perhaps the reason Unix is like that to begin with is due to laziness anyhow 8^). We'll never know for sure. -- | Casey Duncan | Kaivo, Inc. | [EMAIL PROTECTED] `-- ___ 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] case insensitive sorts
Andy McKay wrote: They want information fast and most users expect case insensitive sorts. Its simpler and easy. I think having the ignore_case option for a -tree and -in helps Zope by increasing the ease of development and friendliness to the user. And my point was that this is so universally true that the _pthyon_ sort function (which is at fault here) should be fixed :-) cheers, Chris ___ 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] Allowed characters in Zope ids
I recently read RFC 2396 which defines the generic URI syntax and especially the URL syntax. I recognized, that * Zope forbids many characters in ids (with the error message "not allowed in URLs"), that are legal characters in URL path segments: generally allowed in URL's: -_.!~*'() Zope accepted:_. ~ - as well (see regex below) , is allowed in the id, sorry not sure what the term path segment means.. allowed in path segments: :@=+$, Zope accepted: , This, probably, is not a big problem. But, it would be easy to fix. Except for the fact that Zope also checks that the first character is not a _. Thats a big security headache. To be honest Im not so worried about Zope being more restrictive. * Zope allows space characters in (ObjectManager) id's. The space is not a valid URL character. Zope forbids spaces in property ids. This one is much more important in my mind. Its a real pain. Is there a good reason for this. It should be easy to fix, actually looking at the regex in Object Manager, shouldn't that just be a case of taking the space out of the end of the regex? ObjectManager.py line 112: bad_id=ts_regex.compile('[^a-zA-Z0-9-_~\,\.]').search] On a more anal note could we also patch ObjectManager to tell the user what characters aren't allowed eg: line 224: 'The id "%s" contains characters illegal in URLs.' % id should be line 224: 'The id "%s" contains characters illegal in URLs. Only characters, digits and the characters ~-_,. are allowed.' % id ___ 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] case insensitive sorts
Hmm im actually not so sure on that. Currently you can do a sort either way, if you fix it so its only case sensitive we'll end up like Visual Basic :) Fixing python is a question for the python list and I'd be scared to ask it there... -- Andy McKay, Developer. ActiveState. - Original Message - From: "Chris Withers" [EMAIL PROTECTED] To: "Andy McKay" [EMAIL PROTECTED] Cc: "Casey Duncan" [EMAIL PROTECTED]; "Andy Dawkins" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 03, 2001 8:46 AM Subject: Re: [Zope-dev] case insensitive sorts Andy McKay wrote: They want information fast and most users expect case insensitive sorts. Its simpler and easy. I think having the ignore_case option for a -tree and -in helps Zope by increasing the ease of development and friendliness to the user. And my point was that this is so universally true that the _pthyon_ sort function (which is at fault here) should be fixed :-) cheers, Chris ___ 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 )
[Zope-dev] Objects with multiple parents and storage flexibility, ZPatterns?
Hi, Once again I'm back at trying to solve this problem, hopefully with a little more knowledge this time ;-) What I'd like: 'Zope' objects of type 'X', which can have multiple parents and can contain other objects of type 'X', where storage isn't necessarily tied to the ZODB but where the objects have a normal properties page (in terms of use, again, it'd be nice if it could be stored anywhere) and participate in all the normal Zope security and management interface processes, and they need to be catalogable. This sounds like ZPatterns to me, am I right? If so, it appears there are two choices: 1. Folder w/Customiser Support (FwCS ;-) and DataSkins 2. Specialist with one or more Racks and DataSkins Which one of these would be most appropriate? FwCS containg DataSkins that also mix in the Folder class sound like they'd give a closer approximation to 'real Zope objects', but Racks sound like the only way that objects of the same metatype can come from different sources (eg, some objects of type 'X' from ZODB, some from SQL, some from LDAP ,etc) and seem to be more flexible in general, but can I have DataSkins that nest stored in a specialists' rack, eg: http://server:8080/specialist/dataskin1/dataskin2 How about doing something like: http://server:8080/specialist/dataskin1/dataskin2/manage ? Any help is good help, sorry this is a bit rambling, if you need mroe info, I'll be happy to supply it :-S cheers, Chris ___ 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] case insensitive sorts
Andy McKay wrote: Hmm im actually not so sure on that. Currently you can do a sort either way, if you fix it so its only case sensitive we'll end up like Visual Basic :) Actually, I'd like to see it 'fixed' so it's only case insensitive: Alan betty Carl Wilbur Fixing python is a question for the python list and I'd be scared to ask it there... I'm sure I copied one of these messages to the python list for that very reason but it didn't get any response. Ah well, I'll copy this one there as well and see what happens ;-) cheers, Chris ___ 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] Objects with multiple parents and storage flexibility, ZPatterns?
Hi Chris, Random thoughts follow. ;-) I think that if you make your DataSkins folderish it will be hard to make the storage anything other than ZODB. However, Steve Alexander posted a neat trick the other day where __bobo_traverse__ is supplied by an attribute provider. You could use this to make your DataSkins traversable. Let's say your objects have an attribute that defines them in the context of their parent (e.g., dataskin2 in your example URL), let's call it 'context_id'. You may have six objects with the same context_id, but they would all have different parents. Now.. you could implement a search interface that finds an object in context. GetObjectInContextOfParent( context_id, parent_id ) Each object must also (of course) have a parent_id, unless it's a root level object. In SQL this might be: select * from objectXs where parent_id = 'dataskin1_id' and context_id = 'dataskin2' or it could be a catlog search, if you're in ZODB. Now for the traversal interface: def __bobo_traverse__(self, REQUEST, name): ob = getattr(self, name, _marker) if ob is _marker: ob = self.GetObjectInContextOfParent( context_id = name, parent_id = self.id) if ob is not None: return ob raise 'NotFound' return ob Totally untested of course. ;-) Anyway the idea would be to *not* use folderish DataSkins, but to build a hierarchy out of them that could be traversed. -steve ___ 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 )
[Zope-dev] Re: Objects with multiple parents and storage flexibility, ZPatterns?
Chris Withers wrote: Hi, Once again I'm back at trying to solve this problem, hopefully with a little more knowledge this time ;-) What I'd like: 'Zope' objects of type 'X', which can have multiple parents and can contain other objects of type 'X', where storage isn't necessarily tied to the ZODB but where the objects have a normal properties page (in terms of use, again, it'd be nice if it could be stored anywhere) and participate in all the normal Zope security and management interface processes, and they need to be catalogable. This sounds like ZPatterns to me, am I right? If so, it appears there are two choices: 1. Folder w/Customiser Support (FwCS ;-) and DataSkins 2. Specialist with one or more Racks and DataSkins Which one of these would be most appropriate? If you use a Folder w/ Customizer Support, you'll need to create all the DataSkin instances in the ZODB, just as if they were normal ZClass (or whatever) instances. Thus, the instances all need to be "in there" to start with. You can't add data to your external database, and expect a new Dataskin instance to pop up in the ZODB. This is what is meant by "When using Folder with Customizer Support, DataSkins are anchored in the ZODB". FwCS containg DataSkins that also mix in the Folder class sound like they'd give a closer approximation to 'real Zope objects', but Racks sound like the only way that objects of the same metatype can come from different sources (eg, some objects of type 'X' from ZODB, some from SQL, some from LDAP ,etc) and seem to be more flexible in general, but can I have DataSkins that nest stored in a specialists' rack, eg: You can get the data for your dataskins from a variety of sources, whether you choose to use Specialists or Folder w/ Customizer Support. However, if you use Specialists, you can have the DataSkin instances appear only when requested. Thus, you can add records to your external database, and thereby have new Dataskins available from your application. http://server:8080/specialist/dataskin1/dataskin2 How about doing something like: http://server:8080/specialist/dataskin1/dataskin2/manage You can do this by providing the __bobo_traverse__ protocol, using SkinScript in your Specialist to give objects of the type of dataskin1 an appropriate __bobo_traverse__ method. I briefly described this on zope-dev a couple of days ago. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] Objects with multiple parents and storage flexibility, ZPatterns?
At 05:15 PM 1/3/01 +, Chris Withers wrote: What I'd like: 'Zope' objects of type 'X', which can have multiple parents and can contain other objects of type 'X', where storage isn't necessarily tied to the ZODB but where the objects have a normal properties page (in terms of use, again, it'd be nice if it could be stored anywhere) and participate in all the normal Zope security and management interface processes, and they need to be catalogable. This sounds like ZPatterns to me, am I right? If so, it appears there are two choices: 1. Folder w/Customiser Support (FwCS ;-) and DataSkins 2. Specialist with one or more Racks and DataSkins Which one of these would be most appropriate? FwCS containg DataSkins that also mix in the Folder class sound like they'd give a closer approximation to 'real Zope objects', but Racks sound like the only way that objects of the same metatype can come from different sources (eg, some objects of type 'X' from ZODB, some from SQL, some from LDAP ,etc) and seem to be more flexible in general, but can I have DataSkins that nest stored in a specialists' rack, eg: http://server:8080/specialist/dataskin1/dataskin2 How about doing something like: http://server:8080/specialist/dataskin1/dataskin2/manage You can't really "nest" DataSkins inside each other in a rack, and you really don't want to, anyway. But there's nothing that says you can't create a DataSkin subclass whose __bobo_traverse__ looks up related objects. You just can't "really" store the DataSkins inside each other. Note that if your __bobo_traverse__ uses a specialist "getXforY()" call, you can "store" objects from different databases (racks) "inside" each other. :) ___ 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] OracleStorage, and possibly others
Chris Withers wrote: Jim Fulton wrote: - Policies to control whether multiple revisions are stored or whether revisions are removed by packing on a object-by-object or transaction-by-transaction basis. You could keep significant historical revisions for important objects, such as Wiki pages, templates, scripts, etc., with a policy to decide which revisions are significant. - The ability to set policies to implement quotas. We are also working on ZEO storage replication. This may have a big impact on the storage API, or lead to specialized APIs for replicated storages. very cool :-) Any idea when these will be around to play with? Uh, no. We are actually using a very limited version in production, but the full-featured version is waiting for someone with bandwidth to finish it. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! Technical Director (888) 344-4332http://www.python.org Digital Creationshttp://www.digicool.com http://www.zope.org ___ 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] Import with INSTANCE_HOME?
From: BS [EMAIL PROTECTED] Can anyone tell me how to do a "from Products.ZPatterns import anything" when using INSTANCE_HOME? Do I have to add the INSTANCE_HOME path to sys.path? As long as Python has already imported Zope (i.e. you're in another Product) you don't need to do anything special. All Product directories' contents can be imported with "import Products.whatever". Cheers, Evan @ digicool 4-am ___ 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 )
[Zope-dev] Frozen Zope?
Has anyone tried to use the "Freeze" utility on Zope? How about Gordon McMillian's"Install" application to make a self-contained Python-Zope executable for Win32? My goal is to create a very easy install of Zope that consists of one or two files. For some of my clients this seems less intimidating on their machines (they would rather not see the "source code", just an executable). Do you think this is possible? Thanks
Re: [Zope-dev] ZPatterns question
Hi! Actually should answer to these posts... ;-) On Thu, Dec 28, 2000 at 03:11:37PM -0500, Steve Spicklemire wrote: Hi Christian, Well, nobody else answered that I saw... so I'll take a crack at your questions "CS" == Christian Scholz [EMAIL PROTECTED] writes: CS Hi there! CS Finally I managed to get a basic understanding of how to do CS things with ZPatterns ;-) So seems quite cool :) (and CS hopefully I find some time to write some basic howto about it) CS But I have some little questions: CS 1. Is it possible to retrieve the set of known IDs from a CS specialist? Or would I need to add my own method to it which CS does this (and change it accordingly if I switch to another CS storage method)? If you store persistently you can use the Rack's method: "defaultRack.getPersistentItemIDs()" Thanks, also found this out in the meanwhile. but a couple of notes: 1) this returns a BTree object, not a simple list, so you can't iterate through it in DTML. You'll need to copy it to a simple list for that.. and 2) If you change to a different storage you'll need to create your own method (ZSQL Method?). What I've found is that if you have a large number of objects you'll either want to query a Catalog, or an SQL database to get Ids that match some criteria that limit the number of hits to something that makes sense to display in a browser. I am now using some method I create inside the specialist for it. CS 2. Is it planned to provide something like a virtual folder CS which acts like a normal object manager but is controlled via CS ZPatterns (so actually something like Folder with Customizer CS Support just without the "anchor" in ZODB. (would also CS require some mechanism asked for in 1.) Hmmm... I'm not sure what you're after here. Why not just use a Specialist? In what sense do you want it to be virtual? Well, virtual in the sense as a specialist is no real folder but can provide content from different sources. Thus what I mean is some mechanism which emulates objectIds() etc. so it looks to the user (and the ones using it via dtml) like a normal folder object. Somehow like the Customizer but without the need for actually creating Zope objects. Something inbetween Specialist and Customizer this would be I guess. (Are you looking for a dynamic traversal interface that would allow you to map URLs to objects that are managed by ZPatterns? Can you give an example?) yes, something like this comes close I guess. e.g. I have some sql database consisting of people's addresses and I want to create some specialist which queries this database (or how ever this specialist is configured right now in order to get the object ids) and shows it as if it's a normal folder. (seems to me more transparent at some point). But I assume it's not suited for all applications e.g. if the number of objects gets a little bigger. And I guess I can create this myself if I subclass from Specialist and add the rest of the ObjectManager's interface to it. CS 3. Is it possible to use ZPatterns also without some exta CS ZClass defined in a Product? At least if I don't need methods CS for my objects but simple want to define the attribute they CS know. Would be nice as I could then hold everything together CS in one place (the specialist that is) without requiring to CS install something also in the Products folder of the Control CS Panel. I believe you need to either create a Python subclass, or a ZClass subclass of DataSkin. "Raw" DataSkins don't have the right permissions to allow for TTW access. If you're creating a 'product' anyway... just make a 'dummy' class that you can use for storage. ok, but I still need to define the attributes I want to handle inside a propertysheet of this ZClass, right? Actually what I would like is something which directly resides inside the Specialist and not somewhere outside in some Product folder. So everything is close together in one place. CS That's it for now, I will keep experimenting then.. :) Good Luck! Oh, it's working better than I thought :) but thanks, christian ___ 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] ZPatterns question
Hi Steve! On Thu, Dec 28, 2000 at 10:45:46PM +, Steve Alexander wrote: Steve Spicklemire wrote: CS 2. Is it planned to provide something like a virtual folder CS which acts like a normal object manager but is controlled via CS ZPatterns (so actually something like Folder with Customizer CS Support just without the "anchor" in ZODB. (would also CS require some mechanism asked for in 1.) Hmmm... I'm not sure what you're after here. Why not just use a Specialist? In what sense do you want it to be virtual? (Are you looking for a dynamic traversal interface that would allow you to map URLs to objects that are managed by ZPatterns? Can you give an example?) Reading this just after reading the source to Specialists.py, I had a thought; and tried it out; and it works! :-) You can use SkinScript to define __bobo_traverse__ for a particular kind of DataSkin in a Specialist. For example: WITH SELF COMPUTE __bobo_traverse__=traversal_method that's very cool :) I just created some base class for this from which my ZClasses are derived but nice to know that it's also possible without this base class. (though for this application it's easier with this base class as it's easier to configure then) cheers, Christian ___ 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] Re: Starting ZServer
[EMAIL PROTECTED] writes: My Zserver has started at 8080 but the manage.dtml is not accessible from the browser either as localhost or with the host name. Please suggest me an answer the problem ASAP. You are using: http://localhost:8080/manage do you? You must not use "manage.dtml"! Dieter ___ 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] case insensitive sorts
Chris Withers writes: Andrew bart David sophie Wayne Why in hell do you switch caseness for similar objects? If you apply some naming conventions, such as "objects start with a Capital letter, verb with a lowercase letter", you may find Python's sorting order usefull. Dieter ___ 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] CatalogAware
Chris Withers wrote: Michael Bernstein wrote: If you are writing your own cataloging and uncataloging code, then I think that it could be. G The cataloguing code in Squishdot amounts to about 4 lines, all of which are calls to standard ZCatalog interface methods as described in: http://www.zope.org/Members/michel/Projects/Interfaces/ZCatalog If you don't believe me, grep squishdot.py for catalog_object and uncatalog_object... Ok, I believe you! Don't get mad just beacause I was asking a question. I guess I didn't understand. In fact, if catalog_object and uncatalog_object are interchangeable with index_object and unindex_object, then I'm sure I don't understand the point of inheriting from CatalogAware at all. Is it reindex_object, which doesn't seem to have an equivalent? I was asking why Posting objects shouldn't inherit from CatalogAware? That wouldn't actually change the number of catalog-related lines of code in Squishdot. It was merely increase the compelxity of the product by adding CatalogAware as another base class for postings. All right. Scratching-my-head-over-this-whole-CatalogAware-thing-ly yrs, Michael Bernstein. ___ 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] Frozen Zope?
On Wed, 3 Jan 2001 15:09:02 -0500, "BS" [EMAIL PROTECTED] wrote: My goal is to create a very easy install of Zope that consists of one or two files. For some of my clients this seems less intimidating on their machines (they would rather not see the "source code", just an executable). On win32 there are several other options, depending on your users. You could hide the source directory, or use Explorer's Web View to give it a less intimidating appearance. I hope this helps, Toby Dickenson [EMAIL PROTECTED] ___ 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] Local Factories in Products
Michael Bernstein wrote: Ah! That would be a very simple and elegant way of eliminating 'add-dropdown-box pollution', among other advantages. An excellent proposal, indeed. So, how to go about getting it implemented? cheers, Chris ___ 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] PartitionedFileStorage vs BerkleyStorage
Shane Hathaway wrote: But like I told ChrisW, I think BerkeleyStorage will fill the need that PartitionedFileStorage was only partitially addressing. Is BerkleyStorage going to be as easy to set up and use? I seem to remember Jim F making some comments to the contrary a while back... What about on WinNT? ;-) cheers, Chris ___ 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] Conflict Errors
On Tue, 02 Jan 2001 16:50:49 +, Chris Withers [EMAIL PROTECTED] wrote: However, if anyone does know what constitutes a 'seperate object' in ZODB terms, it be really useful to know. I'm guessing a class which inherits from Persistent? Dictionaries don't, 'cos they're python builtins, which I'm pretty certain was the problem in my case... That is exactly correct. Toby Dickenson [EMAIL PROTECTED] ___ 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] CatalogAware
Chris Withers wrote: Michael Bernstein wrote: I guess it's just a matter of only reinventing the wheels you have to, and writing less code as a result. I'm pretty sure Squishdot is re-inventing no wheels ;-) If you are writing your own cataloging and uncataloging code, then I think that it could be. http://www.zope.org/Members/tseaver/inherit_ZCatalog http://www.zope.org/Members/AlexR/CatalogAware These are both pretty old and seem to be aimed at ZClasses. Squishdot has nothing to do with ZClasses. I realize that Squishdot is a Python product, of course. As far as the information being old, it's tested. I just used it to build a new application this week. No bugs. CatalogAwareness is of no use for a product like Squishdot. Squishdot already inherits from ZCatalog. I realize that Squishdot already inherits from ZCatalog, I was asking why Posting objects shouldn't inherit from CatalogAware? I don't think that only ZClasses can inherit from CatalogAware, that doesn't seem quite right. Again, it's certainly possible that I'm overlooking something. Cheers, Michael Bernstein. ___ 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 )