[Zope-dev] How does a subclass call its ancestor's method in zope?
Here is a ZClass testa, with a dtml method 'do'. Its subclass testb overrides do. How does testb call its ancestor's 'do'? In python, it can be done as 'testa.do()', but what's the equivallent in zope? Dirksen __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.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] patch to bring ZPatterns UI in line with 2.3 from CVS
If you're using ZPatterns or PlugIns with Zope 2.3 from CVS, you can update most of the ZPatterns user-interface to the new style be replacing lib/python/Products/PlugIns/www/main.dtml with this file: http://www.cat-box.net/steve/main.dtml -- 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 )
[Zope-dev] AUTHENTICATION_USER in standard_error_message cause by NotFound error
newbie alert Hello. I've been using zope for a couple of months, i have found zope to be a great product and thank you for creating it. Currently i have run into a problem, i need to access the AUTHENTICATED_USER in a standard_error_message called by notFoundError in BaseRequest. I was wondering if the authentication routine can be added before the authentication routine in BaseRequest? Or if this is not possible it could be split into a function and and call it before the notFoundError call as well? There are many reasons you might want to do this, i have listed some below: * You want list possible urls the reader could have meant but don't want to show let Anonymous users see possible privileged urls * You want to provided different error messages for different people, i.e. a more advanced error for coders, a simple error for html writer, a special error for normal people * You wanted errors to only be reported it they where caused by certain users and the list could go on Mithro /newbie aler ___ 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: ComputedAttribute
Martijn Pieters wrote: Erm. The ExtensionClass.stx documentation hints at a ComputedAttribute class (but as an example of how you could use an ExtensionClass). The current C implementation of ComputedAttribute is not, as far as I can see, documented. Now I think I know the answer to this one, but I'll ask just to be sure: class MyClass(Persistent Acquisition.Explicit): def _set_your_attribute (self,value): self._v_your_attribute = value def _get_your_attribute (self): return self._v_your_attribute your_attribute = ComputedAttribute(_get_your_attribute) ...with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) Hmm... more questions: If I do: x = MyClass() x.your_attribute = 1 ...what happens? Where do you import the ComputedAttribute module from? 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: ComputedAttribute
On Wed, Jan 10, 2001 at 04:13:49PM +, Chris Withers wrote: Martijn Pieters wrote: Erm. The ExtensionClass.stx documentation hints at a ComputedAttribute class (but as an example of how you could use an ExtensionClass). The current C implementation of ComputedAttribute is not, as far as I can see, documented. Now I think I know the answer to this one, but I'll ask just to be sure: class MyClass(Persistent Acquisition.Explicit): def _set_your_attribute (self,value): self._v_your_attribute = value def _get_your_attribute (self): return self._v_your_attribute your_attribute = ComputedAttribute(_get_your_attribute) ...with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) Yup, this allows you to alias your_attribute to _v_your_attribute without creating an attribute that *will* persist in the process. Hmm... more questions: If I do: x = MyClass() x.your_attribute = 1 ...what happens? your_attribute is set to one instead of the ComputedAttribute instance and concequently persisted. If you want _set_your_attribute to be called, you need to override __setattr__: def __setattr__(self, name, value): setter = getattr(self, '_set_' + name, None) if setter: setter(value) else: raise AttributeError, "no such attribute: " + `name` Where do you import the ComputedAttribute module from? from ComputedAttribute import ComputedAttribute -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope 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] Re: ComputedAttribute
Martijn Pieters wrote: ...with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) Yup, this allows you to alias your_attribute to _v_your_attribute without creating an attribute that *will* persist in the process. yay! :-) your_attribute is set to one instead of the ComputedAttribute instance and concequently persisted. d'Oh... of course... If you want _set_your_attribute to be called, you need to override __setattr__: def __setattr__(self, name, value): setter = getattr(self, '_set_' + name, None) if setter: setter(value) else: raise AttributeError, "no such attribute: " + `name` Hmmm... how would you change this to call the __setattr__ that was there before you overrode it, if a setter could not be found? cheers for all the help, this thread might make quite god docs for ComputedAttribute ;-) 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] python script
On Tue, 9 Jan 2001 [EMAIL PROTECTED] wrote: Damnnation, Chris, everyone knows that it is supposed to be spelled Python Thingy. "I recently released 'zopectl', a Python Thingy"... 'Please go wash your hands before your shake hands with me!' Hmm. All kidding aside, Chris is right. This *is* the problem with "python script" that was pointed out during the name discussion. My use of "python script" is the traditional Unix/OS one: "a [shell] script written in python". Oh, well...fortunately the users most likely to be confused are the ones least likely to be using scripts at the os level. --RDM ___ 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: ComputedAttribute
On Wed, Jan 10, 2001 at 05:07:07PM +, Chris Withers wrote: If you want _set_your_attribute to be called, you need to override __setattr__: def __setattr__(self, name, value): setter = getattr(self, '_set_' + name, None) if setter: setter(value) else: raise AttributeError, "no such attribute: " + `name` Hmmm... how would you change this to call the __setattr__ that was there before you overrode it, if a setter could not be found? The same way you call any overridden method, by calling it on the class you inherit it from. So: class Foo: def __setattr__(self, name, value): # Whatever pass class Bar(Foo): def __setattr__(self, name, value): Foo.__setattr__(self, name, value) # More whatever -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope 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 )
[Zope-dev] Security Machinery doesn't work on some objects?
Hi there, I'm slightly confused by a class I have: class X(Persistent, Acquisition.Explicit): This class has no __roles__, no __ac_permissions__, no nothing... Instances of this class are stored within a special folderish class, Y. This folderish class has a __bobo_traverse__ which returns X objects, wrapped in context, from it's self._xs BTree using something along the lines of: def __bobo_traverse__(self, REQUEST, name): ob = getattr(self, name, _marker) if ob == _marker: ob = return self._xs[name].__of__(self) Now, it appears no methods or other attributes of this class are protected by the security machinery, even though the instances involved are wrapped. The DocString stuff still applies but, once a method has a docstring, any anonymous user who can traverse to one of these objects, can execute any method (attributes whinge about a missing docstring, how bizarre, attepting to traverse to __init__ complains the method starts with a _ ;-) of that instance which is more than a little disturbing ;-) I thought Zope's security policy had changed to be disallow by default, but that really doesn't seem to be the case here :-S What am I missing out on? Is there some mixin class I need or something I need to acquire to make the security machinery check these objects? confusedly and worriedly, 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] AUTHENTICATION_USER in standard_error_message cause by NotFound error
Oppps, just realised i've been replying only to myself :) Umm okay here is the diff, it is from version 2.2.4 but should apply to most versions I have removed all the "print" debugging and cleaned up the formatting. Could people look it over and tell me if there are any hidden problems with it? Is it done the right way? There seems to be a lot of repeated code between zpublisher_exception_hook and ZPublisher.BaseRequest, maybe you want to put the auth stuff into it's own function and work that way? Just an idea... Mithro Tim Ansell wrote: No further investigation i have found out that the part i really want to modify is zpublisher_exception_hook, which gets called when the error occurs Inside this functions there is a if REQUEST.get('AUTHENTICATED_USER', None) is None: REQUEST['AUTHENTICATED_USER']=AccessControl.User.nobody which seems to explain why i'm getting the anonymous user for the errors. Is there anyway to add to this function the authentication routines so that is AUTHENTICATED_USER is none it authentication is check with standard_error_message being the object checked against? Am i making any sense? I'm going to give it a go and see what happen... Mithro Tim Ansell wrote: newbie alert Hello. I've been using zope for a couple of months, i have found zope to be a great product and thank you for creating it. Currently i have run into a problem, i need to access the AUTHENTICATED_USER in a standard_error_message called by notFoundError in BaseRequest. I was wondering if the authentication routine can be added before the authentication routine in BaseRequest? Or if this is not possible it could be split into a function and and call it before the notFoundError call as well? There are many reasons you might want to do this, i have listed some below: * You want list possible urls the reader could have meant but don't want to show let Anonymous users see possible privileged urls * You want to provided different error messages for different people, i.e. a more advanced error for coders, a simple error for html writer, a special error for normal people * You wanted errors to only be reported it they where caused by certain users and the list could go on Mithro /newbie aler ___ 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] AUTHENTICATION_USER in standard_error_message cause by NotFound error
Forgot to attach the diff Forgive me it's 4:52am here Mithro Tim Ansell wrote: Oppps, just realised i've been replying only to myself :) Umm okay here is the diff, it is from version 2.2.4 but should apply to most versions I have removed all the "print" debugging and cleaned up the formatting. Could people look it over and tell me if there are any hidden problems with it? Is it done the right way? There seems to be a lot of repeated code between zpublisher_exception_hook and ZPublisher.BaseRequest, maybe you want to put the auth stuff into it's own function and work that way? Just an idea... Mithro Tim Ansell wrote: No further investigation i have found out that the part i really want to modify is zpublisher_exception_hook, which gets called when the error occurs Inside this functions there is a if REQUEST.get('AUTHENTICATED_USER', None) is None: REQUEST['AUTHENTICATED_USER']=AccessControl.User.nobody which seems to explain why i'm getting the anonymous user for the errors. Is there anyway to add to this function the authentication routines so that is AUTHENTICATED_USER is none it authentication is check with standard_error_message being the object checked against? Am i making any sense? I'm going to give it a go and see what happen... Mithro Tim Ansell wrote: newbie alert Hello. I've been using zope for a couple of months, i have found zope to be a great product and thank you for creating it. Currently i have run into a problem, i need to access the AUTHENTICATED_USER in a standard_error_message called by notFoundError in BaseRequest. I was wondering if the authentication routine can be added before the authentication routine in BaseRequest? Or if this is not possible it could be split into a function and and call it before the notFoundError call as well? There are many reasons you might want to do this, i have listed some below: * You want list possible urls the reader could have meant but don't want to show let Anonymous users see possible privileged urls * You want to provided different error messages for different people, i.e. a more advanced error for coders, a simple error for html writer, a special error for normal people * You wanted errors to only be reported it they where caused by certain users and the list could go on Mithro /newbie aler ___ 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 ) --- ./__init__.py.org Thu Jan 11 04:39:25 2001 +++ ./__init__.py Thu Jan 11 04:37:24 2001 @@ -162,6 +162,9 @@ class RequestContainer(ExtensionClass.Base): def __init__(self,r): self.REQUEST=r +from ZPublisher.BaseRequest import old_validation +UNSPECIFIED_ROLES='' + def zpublisher_exception_hook( published, REQUEST, t, v, traceback, # static @@ -208,11 +211,79 @@ break client=published + + auth=REQUEST._auth + +user=groups=None + +while 1: + if REQUEST.get('AUTHENTICATED_USER', None) is None: +# Do authentication here + r = getattr(client, '__roles__', UNSPECIFIED_ROLES) + if r is not UNSPECIFIED_ROLES: +roles = r +elif not got: +roles = getattr(client, entry_name+'__roles__', roles) + +if roles: +if hasattr(client, '__allow_groups__'): +groups=client.__allow_groups__ + +if hasattr(groups, 'validate'): v=groups.validate +else: v=old_validation + +if v is old_validation and roles is UNSPECIFIED_ROLES: +print "Validation and UNSEPCIFIED_ROLES is okay" +# No roles, so if we have a named group, get roles from +# group keys +if hasattr(groups,'keys'): roles=groups.keys() +else: +try: groups=groups() +except: pass +try: roles=groups.keys() +except: pass +
Re: [Zope-dev] Aquisition.Acquired
Shane Hathaway wrote: There's a (much) simpler way: class MyClass(Acquisition.Explicit): your_attribute = Acquisition.Acquired # index_html isn't index_html = None "Acquired" is a special object that the acquisition module looks for. Just noticed you can do this also: class MyClass: # note lack of base class ;-) your_attribute = Acquisition.Acquired ...got the idea from Traversable.py Now if I could just figure out how to make non-SimpleItem classes aware of security (see my other recent post :-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] z'python script
Zope mailing lists wrote: Hmm. All kidding aside, Chris is right. This *is* the problem with "python script" that was pointed out during the name discussion. My use of "python script" is the traditional Unix/OS one: "a [shell] script written in python". This is continuing well beyond amusement, :)! Name it Z'Python Script / z'python script. It's pronounceable (Sounds cool, slightly german), looks distinctive, and, well, would end the naming problems for Zope specific uses of, otherwise general, terminology Z'Terminology of the *Z* Object Publishing Environment: z'python script, or Z'Python Script if you like capping ;), z'perl script, z'python programs (makes sense for Zope programs...), z'poorly named language Thingy. Zope is always z'cool! -Dave Oh, well...fortunately the users most likely to be confused are the ones least likely to be using scripts at the os level. --RDM ___ 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] New UI for 2.3
I think the new UI for 2.3 is great improvement over 2.2. I'm already finding the sorted tables of folder contents useful, and having the add new items select at the top saves time. However, I do not like the 3-frame interface. I feel that the top frame is wasted space. The Zope logo and "Logged in as username | Logout" could as easily go at the bottom of the tree-view frame on the left. This would leave extra screen space for doing work. I realize that I can make the frame smaller by dragging it with my mouse. I do a lot of TTW development, and I think I might find that cumbersome, so I guess I'll be hacking the top frame out of my management interface :-) I also much prefer blue to black as a background colour for the tabs and the "Root Folder" link. The black seems a bit overbearing. -- 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] Re: ComputedAttribute
Chris Withers writes: Martijn Pieters wrote: Now I think I know the answer to this one, but I'll ask just to be sure: class MyClass(Persistent Acquisition.Explicit): def _set_your_attribute (self,value): self._v_your_attribute = value def _get_your_attribute (self): return self._v_your_attribute your_attribute = ComputedAttribute(_get_your_attribute) with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) But, as I understand it, it is only updated in the thread that did the update. Your next request may get a different thread and see a different 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] New UI for 2.3
--- Steve Alexander [EMAIL PROTECTED] wrote: However, I do not like the 3-frame interface. I feel that the top frame is wasted space. The Zope logo and "Logged in as username | Logout" could as easily go at the bottom of the tree-view frame on the left. This would leave extra screen space for doing work. I agree 100%. please change this! I like the look of it, but it serves little purpose for the space it uses. I also much prefer blue to black as a background colour for the tabs and the "Root Folder" link. The black seems a bit overbearing. I agree here as well. Why does the root folder need to look different anyway? Just labelling it "Root Folder" is sufficient IMHO. I think it will cause confusion for it to look so different. = | Casey Duncan | Kaivo, Inc. | [EMAIL PROTECTED] `- __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.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] Re: ComputedAttribute
Chris Withers writes: with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) But, as I understand it, it is only updated in the thread that did the update. Your next request may get a different thread and see a different value. Huh? If I change self._v_your_attribute it's only going to get updated in one thread? That's a bit sucky :-S Doesn't matter in this _particular_ case 'cos this var gets set at the start of every request, but I'm a bit concerned about its general use... any help is good help :-) 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] ANNOUNCE: Zope 2.3.0 alpha 2 released
Hello all, Zope 2.3.0 alpha 2 is now available. You can download it from Zope.org: http://www.zope.org/Products/Zope/2.3.0a2/ This release contains a number of new features, including: - SiteAccess is now a part of the Zope core - Shane Hathaway's CacheManager support and two cache manager implementations have been added - SQLMethods can now be edited using FTP and DAV aware tools - Catalogs have been improved to work much better in virtual host environments - Changes to the Web management interface designed to improve productivity, consistency and aesthetics For more information on what is new in this release, see the CHANGES.txt and HISTORY.txt files for the release: - http://www.zope.org/Products/Zope/2.3.0a2/CHANGES.txt - http://www.zope.org/Products/Zope/2.3.0a2/HISTORY.txt **Please note** that we do not build binary distributions for alpha releases - the alpha is available as a source release only. When we move into the beta period for 2.3, we will build and distribute binary releases. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.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] ZCatalog and 'fuzzy logic'
Morten W. Petersen writes: It seems I misunderstood the term fuzzy logic myself. Fuzzy logic means if I search for a word, for example 'programmer', it will return matches to the words 'program', 'programming','programmable' etc. This, usually, is called "stemming". Though, your examples indicate quite a strong form of it. If you have some tool, maybe LinguistX, that map from a word to its stem and then from the stem to all words with this as stem (or directly give the stem equivalence class of a word), then it is quite easy to incorporate that in Zope's catalog. However, to do that cleanly, you will need good algorithms and/or large dictionaries. This, usually, is not free of charge. 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] ZCatalog and 'fuzzy logic'
--- "Morten W. Petersen" [EMAIL PROTECTED] wrote: [snip] It seems I misunderstood the term fuzzy logic myself. Fuzzy logic means if I search for a word, for example 'programmer', it will return matches to the words 'program', 'programming','programmable' etc. I.e., it will somewhat intelligently return words that are similar in what they mean, using grammar rules (chopping off endings of words and making them match others). Hmm. Cheers, Morten ZCatalog TextIndexes support this type of "wildcard" searching. I posted a message a couple of weeks ago that describes the query syntax. Search the mailing list archives for it. = | Casey Duncan | Kaivo, Inc. | [EMAIL PROTECTED] `- __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.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] ZPatterns, ZClasses, Specialists: Assigningresponsibilities
Phillip J. Eby wrote: At 05:13 PM 12/21/00 +1100, Itai Tavor wrote: I think you're right about this being an OrderLineItem. A couple of fine points, however... First, I don't think there needs to be an "OrderLineItemsWithGraphic" specialist, since there is nothing else that would talk to it. It's fine in this case to have the line item classes (either with graphic or without) handle their own UI snippets. UI delegation is for when an object needs to display UI for some *other* object than itself, since you can always use class extenders and other techniques to reshape the apparent class of an object retrieved from a specialist. The interface which other objects deal with is "OrderLineItem", and they simply expect a portion of the form to be rendered, and it's okay for the class to handle that. I got a bit confused here... the UI snippet for uploading a graphic actually comes from the Graphics Specialist. That's fine, but it should be by way of an object that's filling the OrderLineItem role, yes? But how can this work? If I ask for the graphic in Product.addMeToOrderForm, an OrderLineItem object doesn't exist yet. So Product has to ask the OrderLineItems Specialist for the UI snippet, and OrderLineItems gets it from the Graphics Specialist. Then Product.addMeToOrder can create a new OrderLineItem and hand it the form fields for the graphic. Although, to make it cleaner, Product would add OrderLineItems.newLineItemSnippet to the form, and OrderLineItems would decide what needs to be included in the form - so Product doesn't have to explicitly ask for a Graphic upload form. Or I could eliminate the problem by uploading the graphic from a form displayed by the order line item after it has been added. That's actually what I thought you were doing/intending. This is probably the best way... but it wasn't my original plan. I need to ask for a quantity for every added product, so I was going to have Product.addMeToOrderForm ask for quantity and for a graphic. But instead, I can add a quantity field to the product display page, next to the "Add to Order" button. Then addMeToOrderForm isn't needed at all, Product.addMeToOrder will create a new OrderLineItem object, which will then ask for the graphic if it's needed. Here's the question... how many behaviors are different in the order line item itself? Are you also using fulfillment line items? If the only difference to the order line item is that it references some additional data, then I'd say a single class would be fine. Most of the behavior probably comes in on the fulfillment line item, yes? Again, you can ask your FulfillmentLineItems specialist to create "newLineItemFor(orderLineItem)" and let it decide what kind of implementation to hand back. In this case, it probably will be a different class, while for the order line items, it may or may not buy you anything. I haven't thought of using fulfillment line items... not sure what they are for? An order is considered fulfilled once all items have been shipped, so order line items are responsible for tracking everything that happens until a ShipmentLineItem is created. The order line item for a customizable product tracks the product using state values like 'sent to factory', 'received from factory', etc. So it needs a new set of state values, as well as methods like 'sendManufacturingOrderToFactory'. What exactly does the fulfillment role you're referring to do? Does it do more than a shipment role? Fulfillment would be between ordering and shipping, covering such things as pulling items from the warehouse to customizing them with the graphic. I assumed that an order line item was only meaningful until you have a completed order. You may not need the complexity, but to me it seems like a seperate phase with a very different set of behaviors than what I would think of as an order line item. If I were doing an app like this, I'd at least have some sort of state/status objects to delegate these different behaviors to. But I'd say this could be left to the taste of the chef. :) This is confusing... because in all the E-com designs I've looked at, the order state machine covers everything up to 'order fulfilled'... you're suggesting stopping the order states at 'order authorized' and moving the fulfillment states to the fulfillment object? Also, what do you mean when you say 'state/status objects'? I can understand having OrderLineItem, FulfillmentLineItem and ShippingLineItem where each covers a different range of states, but are you suggesting having separate objects just for tracking the state? -- Itai Tavor"Je sautille, donc je suis." C3Works[EMAIL PROTECTED] - Kermit the Frog "If you haven't got your health, you haven't got anything" ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! **
Re: [Zope-dev] ZCatalog and 'fuzzy logic'
On Wed, 10 Jan 2001, Morten W. Petersen wrote: I do not think that "fuzzy logic" is strongly related to "regexp-like". Anyway. Fuzzy searching often means "finding matches with characters omitted, replaced or inserted". It seems I misunderstood the term fuzzy logic myself. Fuzzy logic means if I search for a word, for example 'programmer', it will return matches to the words 'program', 'programming','programmable' etc. I think your talking about something else. Last i checked, "fuzzy logic" was a logical algebra based on the existence of intermediate truth states, between "true" and "false". It has little or nothing to do with aproximate searching, though i guess you could use it to make assertions about the aproximations. I think what you all are talking about is "fuzzy matching". I.e., it will somewhat intelligently return words that are similar in what they mean, using grammar rules (chopping off endings of words and making them match others). There are also matching mechanisms like soundex, that account for misspelling by translating words to phonetic-equivalent normalized codes, and comparing on that basis. Ken [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] New UI for 2.3
Steve Alexander wrote: I think the new UI for 2.3 is great improvement over 2.2. I'm already finding the sorted tables of folder contents useful, and having the add new items select at the top saves time. However, I do not like the 3-frame interface. I feel that the top frame is wasted space. The Zope logo and "Logged in as username | Logout" could as easily go at the bottom of the tree-view frame on the left. This would leave extra screen space for doing work. I also much prefer blue to black as a background colour for the tabs and the "Root Folder" link. The black seems a bit overbearing. Hmm. I haven't checked out the new interface myself yet, but I wonder if DC did any usability testing on their new UI? 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 )
[Zope-dev] first zope-2.3.0a2 bug :-)
well, this one is easy. 8-- --- lib/python/Shared/DC/ZRDB/Aqueduct.py.origThu Jan 11 10:59:42 2001 +++ lib/python/Shared/DC/ZRDB/Aqueduct.py Thu Jan 11 10:58:01 2001 @@ -272,7 +272,7 @@ custom_default_report_src=DocumentTemplate.File( -os.path.join(dtml_dir,'customDefaultReport.dtml')) +os.path.join(dtml_dir,'dtml/customDefaultReport.dtml')) def custom_default_report(id, result, action='', no_table=0, goofy=regex.compile('[^a-zA-Z0-9_]').search 8-- without this patch, sql methods cannot we tested because customDefaultReport cannot be found (it moved in the dtml subfolder) ___ 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] AUTHENTICATION_USER in standard_error_message cause by NotFound error
I appears last night i didn't test the diff... This one should work without any editing... Mithro Tim Ansell wrote: Forgot to attach the diff Forgive me it's 4:52am here Mithro Tim Ansell wrote: Oppps, just realised i've been replying only to myself :) Umm okay here is the diff, it is from version 2.2.4 but should apply to most versions I have removed all the "print" debugging and cleaned up the formatting. Could people look it over and tell me if there are any hidden problems with it? Is it done the right way? There seems to be a lot of repeated code between zpublisher_exception_hook and ZPublisher.BaseRequest, maybe you want to put the auth stuff into it's own function and work that way? Just an idea... Mithro Tim Ansell wrote: No further investigation i have found out that the part i really want to modify is zpublisher_exception_hook, which gets called when the error occurs Inside this functions there is a if REQUEST.get('AUTHENTICATED_USER', None) is None: REQUEST['AUTHENTICATED_USER']=AccessControl.User.nobody which seems to explain why i'm getting the anonymous user for the errors. Is there anyway to add to this function the authentication routines so that is AUTHENTICATED_USER is none it authentication is check with standard_error_message being the object checked against? Am i making any sense? I'm going to give it a go and see what happen... Mithro Tim Ansell wrote: newbie alert Hello. I've been using zope for a couple of months, i have found zope to be a great product and thank you for creating it. Currently i have run into a problem, i need to access the AUTHENTICATED_USER in a standard_error_message called by notFoundError in BaseRequest. I was wondering if the authentication routine can be added before the authentication routine in BaseRequest? Or if this is not possible it could be split into a function and and call it before the notFoundError call as well? There are many reasons you might want to do this, i have listed some below: * You want list possible urls the reader could have meant but don't want to show let Anonymous users see possible privileged urls * You want to provided different error messages for different people, i.e. a more advanced error for coders, a simple error for html writer, a special error for normal people * You wanted errors to only be reported it they where caused by certain users and the list could go on Mithro /newbie aler ___ --- ./__init__.py.original Wed Jan 10 23:13:53 2001 +++ ./__init__.py Wed Jan 10 23:45:28 2001 @@ -162,6 +162,9 @@ class RequestContainer(ExtensionClass.Base): def __init__(self,r): self.REQUEST=r +from ZPublisher.BaseRequest import old_validation +UNSPECIFIED_ROLES='' + def zpublisher_exception_hook( published, REQUEST, t, v, traceback, # static @@ -208,11 +211,79 @@ break client=published + + auth=REQUEST._auth + +user=groups=None + +while 1: + if REQUEST.get('AUTHENTICATED_USER', None) is None: +# Do authentication here + r = getattr(client, '__roles__', UNSPECIFIED_ROLES) + if r is not UNSPECIFIED_ROLES: +roles = r +elif not got: +roles = getattr(client, entry_name+'__roles__', roles) + +if roles: +if hasattr(client, '__allow_groups__'): +groups=client.__allow_groups__ + +if hasattr(groups, 'validate'): v=groups.validate +else: v=old_validation + +if v is old_validation and roles is UNSPECIFIED_ROLES: +print "Validation and UNSEPCIFIED_ROLES is okay" +# No roles, so if we have a named group, get roles from +# group keys +if hasattr(groups,'keys'): roles=groups.keys() +else: +try: groups=groups() +except: pass +try: roles=groups.keys() +except: pass + + if groups is None: + # Public group, hack structures to get it to +validate + roles=None + auth='' + +if v is old_validation: +
Re: [Zope-dev] Re: ComputedAttribute
On Wed, Jan 10, 2001 at 11:09:43PM +0100, Dieter Maurer wrote: Chris Withers writes: Now I think I know the answer to this one, but I'll ask just to be sure: class MyClass(Persistent Acquisition.Explicit): def _set_your_attribute (self,value): self._v_your_attribute = value def _get_your_attribute (self): return self._v_your_attribute your_attribute = ComputedAttribute(_get_your_attribute) with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) But, as I understand it, it is only updated in the thread that did the update. Your next request may get a different thread and see a different value. Indeed, only persistent variables are shared between threads (and globals of course, which creates a need for some kind of protection). -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope 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] Re: ComputedAttribute
On Wed, Jan 10, 2001 at 11:37:55PM -, Chris Withers wrote: Chris Withers writes: with this class, your_attribute isn't going to play in Persistence, is it? (so I can update it lots without worrying about ZODB size growing... :-) But, as I understand it, it is only updated in the thread that did the update. Your next request may get a different thread and see a different value. Huh? If I change self._v_your_attribute it's only going to get updated in one thread? That's a bit sucky :-S Doesn't matter in this _particular_ case 'cos this var gets set at the start of every request, but I'm a bit concerned about its general use... any help is good help :-) The whole threading spiel in Zope works because of ZODB persistence; any thread accessing an object whose variables have been changed has to retry with a fresh copy from the ODB. But because _v_* variables don't get pickled, another thread will never see them. If you want non-persisting (volatile) variables shared between threads, you'll have to devise your own mechanism for assuring the thread-safety of those variables. -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope 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] xmldocument
Relational database adapters (like ZOracleDA, etc.) are currently not compatible with subtransactions. I worked around this for a customer by adding dummy commit_sub and abort_sub methods to the database adapter's DB class, e.g. def commit_sub(*arg, **kw): pass def abort_sub(*arg, **kw): pass - Original Message - From: "Phil Harris" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 3:56 AM Subject: Re: [Zope] xmldocument Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil - Original Message - From: "Bak@kedai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 4:40 AM Subject: [Zope] xmldocument happy new year all i can't get xmldocument to work with zope2.2x i can install the product ok, but can;t add XML Document. i got attribute error. any insight into the error is appreciated. can anybody suggest ways of rendering xml documents in zope? thanks --8 PSTRONGAttributeError/STRONG/P Sorry, a Zope error occurred.p !-- Traceback (innermost last): File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 175, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 235, in commit File /home/kdie/Zope/lib/python/ZODB/Transaction.py, line 261, in commit AttributeError: commit_sub -- -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine We don't need no, no, no, no, no parental guidance here! ___ 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 ) ___ 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] xmldocument
Chris, This occurs using the bog-standard ZODB as well, nothing to do with any other storage facility. Phil - Original Message - From: "Chris McDonough" [EMAIL PROTECTED] To: "Phil Harris" [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 9:27 AM Subject: Re: [Zope] xmldocument Relational database adapters (like ZOracleDA, etc.) are currently not compatible with subtransactions. I worked around this for a customer by adding dummy commit_sub and abort_sub methods to the database adapter's DB class, e.g. def commit_sub(*arg, **kw): pass def abort_sub(*arg, **kw): pass - Original Message - From: "Phil Harris" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 3:56 AM Subject: Re: [Zope] xmldocument Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil - Original Message - From: "Bak@kedai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 4:40 AM Subject: [Zope] xmldocument happy new year all i can't get xmldocument to work with zope2.2x i can install the product ok, but can;t add XML Document. i got attribute error. any insight into the error is appreciated. can anybody suggest ways of rendering xml documents in zope? thanks --8 PSTRONGAttributeError/STRONG/P Sorry, a Zope error occurred.p !-- Traceback (innermost last): File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 175, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 235, in commit File /home/kdie/Zope/lib/python/ZODB/Transaction.py, line 261, in commit AttributeError: commit_sub -- -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine We don't need no, no, no, no, no parental guidance here! ___ 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 ) ___ 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] xmldocument
Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil - Original Message - From: "Bak@kedai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 4:40 AM Subject: [Zope] xmldocument happy new year all i can't get xmldocument to work with zope2.2x i can install the product ok, but can;t add XML Document. i got attribute error. any insight into the error is appreciated. can anybody suggest ways of rendering xml documents in zope? thanks --8 PSTRONGAttributeError/STRONG/P Sorry, a Zope error occurred.p !-- Traceback (innermost last): File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 175, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 235, in commit File /home/kdie/Zope/lib/python/ZODB/Transaction.py, line 261, in commit AttributeError: commit_sub -- -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine We don't need no, no, no, no, no parental guidance here! ___ 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 )
[Zope] List of New products
It was a great idea to get the list of product sort on date in download zone. Today appears only categories and product annonced in news. So, is it a maintenance period or a stable presentation of products ? FRC. ___ 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] xmldocument
On Wednesday 10 January 2001 16:56, Phil Harris wrote: Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil to say the file is big is an understatement. how can adding a news file be too big for zope to cope? unless the default XML Document is huge. i'll peek at the collector. thanks phil -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine I will follow you! ..Damage Inc ___ 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] Re: [Zope-dev] ZCatalog and 'fuzzy logic'
I do not think that "fuzzy logic" is strongly related to "regexp-like". Anyway. Fuzzy searching often means "finding matches with characters omitted, replaced or inserted". It seems I misunderstood the term fuzzy logic myself. Fuzzy logic means if I search for a word, for example 'programmer', it will return matches to the words 'program', 'programming','programmable' etc. I.e., it will somewhat intelligently return words that are similar in what they mean, using grammar rules (chopping off endings of words and making them match others). Hmm. Cheers, Morten ___ 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] xmldocument
I've never seen that failure mode.. It'd be nice to get a reproducible bug out of it. - Original Message - From: "Phil Harris" [EMAIL PROTECTED] To: "Chris McDonough" [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 4:09 AM Subject: Re: [Zope] xmldocument Chris, This occurs using the bog-standard ZODB as well, nothing to do with any other storage facility. Phil - Original Message - From: "Chris McDonough" [EMAIL PROTECTED] To: "Phil Harris" [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 9:27 AM Subject: Re: [Zope] xmldocument Relational database adapters (like ZOracleDA, etc.) are currently not compatible with subtransactions. I worked around this for a customer by adding dummy commit_sub and abort_sub methods to the database adapter's DB class, e.g. def commit_sub(*arg, **kw): pass def abort_sub(*arg, **kw): pass - Original Message - From: "Phil Harris" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 3:56 AM Subject: Re: [Zope] xmldocument Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil - Original Message - From: "Bak@kedai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 4:40 AM Subject: [Zope] xmldocument happy new year all i can't get xmldocument to work with zope2.2x i can install the product ok, but can;t add XML Document. i got attribute error. any insight into the error is appreciated. can anybody suggest ways of rendering xml documents in zope? thanks --8 PSTRONGAttributeError/STRONG/P Sorry, a Zope error occurred.p !-- Traceback (innermost last): File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook File /home/kdie/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 175, in publish File /home/kdie/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 235, in commit File /home/kdie/Zope/lib/python/ZODB/Transaction.py, line 261, in commit AttributeError: commit_sub -- -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine We don't need no, no, no, no, no parental guidance here! ___ 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 ) ___ 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] Tux Zope?
This is precisely what Zope's new cache management architecture is designed to do. Just create the site then install a cache manager object such as an "Accelerated HTTP Cache Manager", available in the StandardCacheManagers product. Visit the "Associate" tab of the cache manager to locate all images that should be served by Tux rather than Zope. Turn on the checkboxes. Voila! Impressive. The cache management architecture is part of 2.3 right? Gotta try it sometime this week... Accelerated HTTP cache managers set some HTTP headers on the response. The headers are recognized by downstream caches and the response is cached for a determined period. Simple, reliable, and flexible. Simple indeed. Good work :) Cya Jonathan ___ 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] permissions problem upgrading to 2.3.0a1 from 2.1.6
Hi, I've been using 2.1.6 for a long time without any problem, using a home compiled python 1.5.2 Yesterday I've tried to upgrade to 2.3.0a1 the following way: export each and every home made sites and products (ZClasses) from 2.1.6 stop 2.1.6 install 2.3.0a1 and start it import each and every exported sites and products (I've not tried using the same Data.fs as 2.1.6) In all instances of a ZClass I've made, I used to (in 2.1.6) call a DTML method from my browser which was protected in a way to display the authentication box, allowing me to enter my username and password. The username and password should give me a role created in the ZClass instance constructor, this role is allowed to create and modify some subobjects (another ZClass) Since I've installed 2.3.0a1 then when I tell my browser to "call" the DTML method the authentication box appears but I'm not able to authenticate myself: it always give me an unauthorized exception. Looking at zope log it gives me a 401 error on the DTML method. If I modify this method to do nothing but return plain text the problem persists. I've checked several times the username and password and I'm sure I've typed them correctly. In one instance of my ZClass I've tried to give all permissions to the created role, but with no luck. I've finally stopped 2.3.0a1 and relaunched the 2.1.6. Does someone have any idea of where the problem may come from ? Should I try to use the same Data.fs of 2.1.6 ? Should I try to use 2.2.5 instead of 2.3.0a1 (I'd like to be able to use PythonScripts) ? Thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Import problem
Hello, I tried to create my first class following a tutorial. I exported the rudimentary class via export function. Now I wanted to import it on my laptop to continue working on it but importing failed with the message: The object my_class_name does not support this operation What could be wrong here? Which information do you possibly need? Is there a document to read first before trying such stuff? Kind regards and sorry for this simple question Andreas. ___ 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] xmldocument
On Wednesday 10 January 2001 17:55, Chris McDonough wrote: I've never seen that failure mode.. It'd be nice to get a reproducible bug out of it. this is wierd. with new install of zope2.16, zope2.20, zope2.2.5 - XMLDocunebt add works great. no error. but with zope2.2.5 (with all other products used[1] added), i got the original error. i use a lot of SQL stuff, but not where i tried to add XML document steps taken- -create new folder -add XML Document -the addForm appeared. insert id -when i clicked add/add and edit, i got the commit error. if i were to follow your advice, where should i put the dummy commit_sub? [1] product list follows -8 AddressBookNavigator Refresh XMLDocument ZPyGreSQLDA BTreeFolder Feedback.tar.gz NewsHostRenderable XMLWidgets ZRTChat BookmarkFolder GUM NewsSyndicate SQLSession ZCalendarZSQLMethods Boring HiperDom Notes SimpleGb ZCallableZWiki CVS Hotfix_2000-10-02 OFSPSquishdot ZCatalog ZnolkSQLWizard CachePool LocalFS POPMailBase TinyTable ZCounter ZopeTutorial CalendarLoginManager PTKBase TodoFolder ZDBase __init__.py CalendarFolder MIMETools PTKDemo Transform.tar.gz ZDConfera__init__.pyc DemoPortal MailHost PersonalFolder TutorialPoll ZFormulator _pgmodule.so EventFolder MembershipPollTutorialPollExamples ZGadflyDAmkproduct ExternalMethod Minimal PythonMethodUserDb ZGb mkproduct-data FSDump MountedClientStorage RFC822Message Wizard ZMirror FeedbackMountedFileStorageRSSChannel Workspace ZPoPyDA -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine Just bring it! ___ 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] Holiday Calendar anyone?
I've been asked to put up a Holiday Calendar on our Intranet by my HR. We're currently using Squishdot and EventFolder for the Intranet frontpage. Does anybody have or know of anything that might save me some time? Doesn' ___ 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] Holiday Calendar anyone? (cont.)
Doesn't have to be a Zope product. Not even Python for that matter. Just as long as it is possible to _integrate_ with a zope site. Depends on WHEN you need it ... By end of January/early February we'll have a groupware thingy ready that will do things like holiday planning etc. (and much more ...) Joachim ___ 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] List of New products
On Wednesday 10 January 2001 10:04, Francois-regis Chalaoux wrote: It was a great idea to get the list of product sort on date in download zone. Today appears only categories and product annonced in news. So, is it a maintenance period or a stable presentation of products ? There is a link on the left ("All Products") that gives you back the full list. But I had to search for it, too ... Cheers, Joachim ___ 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] Holiday Calendar anyone? (cont.)
[ sorry for the broken up email. I accidently pushed Ctrl+Return] ... Doesn't have to be a Zope product. Not even Python for that matter. Just as long as it is possible to _integrate_ with a zope site. Thanks, Peter ___ 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] Holiday Calendar anyone? (cont.)
By end of January/early February we'll have a groupware thingy ready that will do things like holiday planning etc. (and much more ...) Where can we look at a preview? :) /Magnus ___ 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] Caching/http-acceleration and proxying Zope-served con tent
On Mon, 08 Jan 2001 14:34:20 -0800, [EMAIL PROTECTED] wrote: If it supports the ability to direct traffic based upon the virtual host address, then squid works Yes, squid can do this using a redirector; an external program to rewrite urls. Toby Dickenson [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] REPOST: dtml-with doesn't work
Hopefully that will get someone's attention. I have an SQL method that returns (name,domain,otherstuff) I have a DTML method (/root/host/show) that looks like this: dtml-comment 'name' and 'domain' are set to the primary hostname and domain at this point by whatever calls this DTML method POINT A /dtml-comment dtml-in "HDB_get_ip_aliases(ip=ip)" dtml-commentPOINT B/dtml-comment dtml-let name2=name domain2=domain dtml-with alias dtml-commentPOINT C/dtml-comment dtml-with "_.namespace(name=name2,domain=domain2)" dtml-commentPOINT D/dtml-comment dtml-var show /dtml-with /dtml-with /dtml-let /dtml-in The folder structure is: /root /alias show /host show At the points marked B and D, dtml-var name and dtml-var domain work fine, but at point B, name and domain have been reset to what they were at point A. Why? This is totally broken - I'm *this* far from downloading the servlet engine and giving up completely. Zope appears to be completely non-intuitive in many respects, and combined with the generally lamentable documentation, is taking up more of my time than I'm willing to spend on a theoretically simple task. Regards, Phil +--+ | Phil Mayers, Network Support | | Centre for Computing Services| | Imperial College | +--+ ___ 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] Memory problems
Hi, Since a few days I'm experiencing some response problems on my zope site. At some moments calling a page goes very fast a few seconds later, recalling this page takes very long! At the end, every page takes long time, if they ever appear If I use a simple memory checker program, then I see that memory leaks away (memory goes from 48Mfree to 41M in 15min!! and eventially it ends at a few thousands K) However, I've no idea if it is comming from Zope 2.2.5 or from my database adapter in zope, or from somewhere else Is there a good way to check memory leaks and to pinpoint them? If I ask to show me the processes on my Linux box, I see the following related ones : /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (root) /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (nobody) /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (nobody) /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (nobody) /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (nobody) /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (nobody) /usr/local/zope/bin/python /usr/local/zope/z2.py -Z /home/httpd/zope/var/zProcess.pid (nobody) gds_inet_server # Interbase Database Remote Server (root) gds_inet_server # Interbase Database Remote Server (root) Is it normal that zope opens so much processes? 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 )
Re: [Zope] Special-name of variables called 'name' or 'domain'
"Mayers, Philip J" wrote: snip Try this: Change your show method in root to be as follows: dtml-in get_machine_hosts dtml-var show_row dtml-in get_host_aliases dtml-var show_row /dtml-in /dtml-in And add another DTML method in root as follows: show_row: TR TDdtml-var ip missing/TD TDdtml-name;/TD TDdtml-domain;/TD /TR so you have: /root get_machine_hosts (SQL method) get_host_aliases (SQL method) show (dtml method) show_row (dtml method) Does that solve your problem? (I know it doesn't sovle any concerns you have about dtml-with and SQL method, but your posting wasn't exactly to reproduce, and so even if submitted to the collector, isn't likely to get followed up) While I'm at it, is dtml-with foldernamedtml-var dtmlmethod/dtml-with really the best way to call a DTML method of a folder? Mostly, yes... BTW, checkout http://www.zope.org/Members/michel/ZB/ and have a good read :-) cheers, Chris ___ 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] Special-name of variables called 'name' or 'domain'
That was how I had the code originally. Didn't help. I've already read the Zope 'book' (if I were using 2.3 (which I can't, because LoginManager doesn't work OOTB), I'd be using Python methods to do most of this instead. I'm not, I'm using 2.2.5) Thanks anyway. Regards, Phil +--+ | Phil Mayers, Network Support | | Centre for Computing Services| | Imperial College | +--+ -Original Message- From: Chris Withers [mailto:[EMAIL PROTECTED]] Sent: 10 January 2001 13:09 To: Mayers, Philip J Cc: '[EMAIL PROTECTED]' Subject: Re: [Zope] Special-name of variables called 'name' or 'domain' "Mayers, Philip J" wrote: snip Try this: Change your show method in root to be as follows: dtml-in get_machine_hosts dtml-var show_row dtml-in get_host_aliases dtml-var show_row /dtml-in /dtml-in And add another DTML method in root as follows: show_row: TR TDdtml-var ip missing/TD TDdtml-name;/TD TDdtml-domain;/TD /TR so you have: /root get_machine_hosts (SQL method) get_host_aliases (SQL method) show (dtml method) show_row (dtml method) Does that solve your problem? (I know it doesn't sovle any concerns you have about dtml-with and SQL method, but your posting wasn't exactly to reproduce, and so even if submitted to the collector, isn't likely to get followed up) While I'm at it, is dtml-with foldernamedtml-var dtmlmethod/dtml-with really the best way to call a DTML method of a folder? Mostly, yes... BTW, checkout http://www.zope.org/Members/michel/ZB/ and have a good read :-) cheers, Chris ___ 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] SQL Method, dtml-with and namespace weirdness
"Mayers, Philip J" wrote: Change your show method in root to be as follows: dtml-in get_machine_hosts dtml-var show_row dtml-in get_host_aliases dtml-var show_row /dtml-in /dtml-in And add another DTML method in root as follows: show_row: TR TDdtml-var ip missing/TD TDdtml-name;/TD TDdtml-domain;/TD /TR so you have: /root get_machine_hosts (SQL method) get_host_aliases (SQL method) show (dtml method) show_row (dtml method) That was how I had the code originally. Didn't help. What happens when you try that? Errors? Unexpected values? I've already read the Zope 'book' Yes, it is frustrating how long it's taking for that to get printed, I wonder what's holding it up? (if I were using 2.3 (which I can't, because LoginManager doesn't work OOTB), I remember seeing the posts relating to that, did you ever find out why it wasn't working? I'd be using Python methods to do most of this instead. I'm not, I'm using 2.2.5) Wise choice, but you mean python scripts in 2.3 ;-) You can actually download Python _Methods_ right now and use them in 2.2.5: http://www.zope.org/Members/4am/PythonMethod cheers, Chris ___ 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] SQL Method, dtml-with and namespace weirdness
Sorry - I'm being unclear: the result is exactly the same either way i.e. the variables "name" and "domain" seem to be reset to the values from outside the dtml-in block when entering the dtml-with block. I'm wondering if it's a bug in the postgres DA, since I can't reproduce it with a quick gadfly test. I'm just going to try it out now. I'm using Zope 2.2.5, PoPy 2.0.1 from SourceForce, and ZPoPyDA-1.1-pre2 - I couldn't get any (potentially more stable) combination of PoPy or ZPoPyDA to work. Regards, Phil +--+ | Phil Mayers, Network Support | | Centre for Computing Services| | Imperial College | +--+ -Original Message- From: Chris Withers [mailto:[EMAIL PROTECTED]] Sent: 10 January 2001 13:30 To: Mayers, Philip J Cc: '[EMAIL PROTECTED]' Subject: Re: [Zope] SQL Method, dtml-with and namespace weirdness "Mayers, Philip J" wrote: Change your show method in root to be as follows: dtml-in get_machine_hosts dtml-var show_row dtml-in get_host_aliases dtml-var show_row /dtml-in /dtml-in And add another DTML method in root as follows: show_row: TR TDdtml-var ip missing/TD TDdtml-name;/TD TDdtml-domain;/TD /TR so you have: /root get_machine_hosts (SQL method) get_host_aliases (SQL method) show (dtml method) show_row (dtml method) That was how I had the code originally. Didn't help. What happens when you try that? Errors? Unexpected values? I've already read the Zope 'book' Yes, it is frustrating how long it's taking for that to get printed, I wonder what's holding it up? (if I were using 2.3 (which I can't, because LoginManager doesn't work OOTB), I remember seeing the posts relating to that, did you ever find out why it wasn't working? I'd be using Python methods to do most of this instead. I'm not, I'm using 2.2.5) Wise choice, but you mean python scripts in 2.3 ;-) You can actually download Python _Methods_ right now and use them in 2.2.5: http://www.zope.org/Members/4am/PythonMethod cheers, Chris ___ 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] get property of type 'list'
Hi! I add a list property to a DTML document of type 'tokens' (e.g. '[1, 2, 3]') wenn i try to retrieve it with _.getitem i get '[1,' '2,' '3]' instead of '1' '2' '3' How can I get Zope to interpret my property like a list not a string or whatever else? Thank you in advance! ___ 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] SQL Method, dtml-with and namespace weirdness
"Mayers, Philip J" wrote: Sorry - I'm being unclear: the result is exactly the same either way i.e. the variables "name" and "domain" seem to be reset to the values from outside the dtml-in block when entering the dtml-with block. Change your show method in root to be as follows: dtml-in get_machine_hosts dtml-var show_row dtml-in get_host_aliases dtml-var show_row /dtml-in /dtml-in And add another DTML method in root as follows: show_row: TR TDdtml-var ip missing/TD TDdtml-name;/TD TDdtml-domain;/TD /TR Now I could grep the above to be sure, but I'm prety certain there aren't any dtml-with's in there... Perhaps the above might be worth trying out? ;-) cheers, Chris ___ 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] SQL Method, dtml-with and namespace weirdness
Ok, using Postgresql 7.0.2-2, PoPo 2.0.1, ZPoPyDA 1.1-pre2, Zope 2.2.5, here's a reproducible scenario: Create the following tables in your database: create table bugtest1 ( name text, domain text, ); create table bugtest2 ( name text, domain text, refer text, foreign key(refer) references bugtest1(name) ); insert into bugtest1 values ('a','aa'); insert into bugtest1 values ('b','bb'); insert into bugtest1 values ('c','cc'); insert into bugtest2 values ('w','ww','a'); insert into bugtest2 values ('x','xx','a'); insert into bugtest2 values ('y','yy','a'); insert into bugtest2 values ('z','zz','a'); insert into bugtest2 values ('g','gg','b'); insert into bugtest2 values ('h','hh','b'); insert into bugtest2 values ('i','hh','b'); Create the following folder structure: /root dbconn (ZPoPyDA connection to whatever database you just put the tables in) index_html get_host (Z SQL method) get_alias (Z SQL method) /alias show /host show /root/get_host select * from bugtest1 /root/get_alias select * from bugtest2 dtml-sqlgroup where dtml-sqltest name column=refer type=string /dtml-sqlgroup /root/alias/show TRTD/TDTDdtml-name;/TDTDdtml-domain;/TD/TR /root/host/host TRTDdtml-name;/TDTDdtml-domain;/TD/TR /root/index_html: 1: dtml-var standard_html_header 2: TABLE 3: dtml-in get_host 4: dtml-with hostdtml-var show/dtml-with 5: dtml-in "get_alias(name=name)" 6: dtml-let name2=name 7: domain2=domain 8: dtml-with alias 9: TRTDPOINT A/TDTDdtml-name;/TDTDdtml-domain;/TD/TR 10: TRTDPOINT B/TDTDdtml-name2;/TDTDdtml-domain2;/TD/TR 11: dtml-var show 12: /dtml-with 13: TRTDPOINT C/TDTDdtml-name;/TDTDdtml-domain;/TD/TR 14: TRTDPOINT D/TDTDdtml-name2;/TDTDdtml-domain2;/TD/TR 15: /dtml-let 16: /dtml-in 17: /dtml-in 18: /TABLE 19: dtml-var standard_html_footer The output of all that is (a bit hard to read): a aa POINT A a aa POINT B w ww a aa POINT C w ww POINT D w ww POINT A a aa POINT B x xx a aa POINT C x xx POINT D x xx POINT A a aa POINT B y yy a aa POINT C y yy POINT D y yy POINT A a aa POINT B z zz a aa POINT C z zz POINT D z zz snipped for clarity So: at point A, the "name" and "domain" variables have been overwritten with the "name" and "domain" variables as they were on line 6/7, *BUT* name2 and domain2 haven't been overwritten (point B). BUT, outside the dtml-with tab (point C) "name" and "domain" are at their correct values. So - given that the dtml-with tag "must" work, I'm clearly not understanding *how* it works. Regards, Phil +--+ | Phil Mayers, Network Support | | Centre for Computing Services| | Imperial College | +--+ ___ 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] MySQLDA and MySQL-python - patch needed?
My Zope-MySQL connection is still not quite working. It appears that the request from Zope is reaching MySQL and it if is an UPDATE or INSERT query it executes properly on the MySQL side. However, SELECT queries and similar are not getting their information back to Zope from MySQL. Is there some patch I am missing here? Anybody know how to fix this? FYI: I installed from these rpms ftp://ftp.logicetc.com/pub/Zope/RPMS/MySQL-python-0.2.1-1.i386.rpm ftp://ftp.logicetc.com/pub/Zope/RPMS/Zope-ZMySQLDA-1.2.0-1.i386.rpm This did not install into my Zope installation directory, so I used a symbolic link in my Zope Products directory that points to the directory of MySQLDA install. Could this be the cause? Perhaps information that should be returned from MySQL is getting lost on the return trip. If so, how would I fix it? Any ideas? P. Johnson ___ 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] get property of type 'list'
From: Andrei Belitski [mailto:[EMAIL PROTECTED]] I add a list property to a DTML document of type 'tokens' (e.g. '[1, 2, 3]') wenn i try to retrieve it with _.getitem i get '[1,' '2,' '3]' instead of '1' '2' '3' How can I get Zope to interpret my property like a list not a string or whatever else? Actually it IS treating it as a list: dtml-var "tokens[0]" Should return '1' This should list each item: dtml-in tokens dtml-var sequence-itembr /dtml-in Regards Max M ___ 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] ZWikiWebs Product
Has anyone else had trouble using the ZWikiWeb product? As Manager, there are no problems, but users I have added cannot add ZWikiWebs in their own folders. While already logged in, a login box comes up, meaning they do not have the necessary permissions. When I cancel the box, I get the Zope error message stating that the user is not authorized to access Control_Panel. I have given the user role (that I created) access to view contents, view, use factories, change zwiki pages, and serveral others. Is there something I am missing? Thanks, Matt ___ 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] Storing and Using Object references
Hello all, i have a question and I hope someone can point me in the right direction to solve it. I need one zope object to hold a reference to another zope object so the first object can call methods of the second object. oh, these are python classes. Example: object 1 is : /container1/container1a/item1 object 2 is : /container2/container2a/item1 object1 needs to hold a reference to object2. I'm really stuck on how to store and access object2 from object1. any pointers? Tom Jenkins devis - Development InfoStructure http://www.devis.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 )
[Zope] Design/DTML question
Hi everyone, I'm working on a Web page for our local school board. I'd like to create a table that would display links to past board meeting minutes. The table would look like this: (Note: dates are bogus) +---+ | Meeting Minutes | | | | Monday, Jan. 10 Monday, Mar. 7 | | Tuesday, Jan. 24 Monday, Mar. 20 | | Monday, Feb. 7 Monday, Apr. 5 | | Monday, Feb. 27 Tues., Apr. 19 | | | |1999 | 2000 | 2001 | +---+ By default, dates for the current year would be displayed, but clicking on the years at the bottom of the table would display those dates. Right now, I've got the dates stored in a TinyTable. I can iterate through that list and generate the links, but I can't figure out how to display the table in two columns. dtml-in meetingDateTable trtddtml-var meeting_date/td/tr /dtml-in will print the dates in a single column, but how can I iterate through and refer to two different dates in one dtml-in pass? (Does that make sense?) The second thing I'm tring to figure out is how to make the year links at the bottom generate the new table of dates from a different TinyTable. Maybe I should use the same TinyTable for all of the meeting dates and pull out whichever year I need when the table is rendered. I'm also wondering if I should implement these meeting minutes and agendas in a ZClass. At first it seemed like this would be too simple to bother with, but now I'm wondering if a ZClass would be a better approach. I'd appreciate any comments. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ [EMAIL PROTECTED] | dtml-var pithy_quote | http://linux.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] Design/DTML question
From: Timothy Wilson [mailto:[EMAIL PROTECTED]] Right now, I've got the dates stored in a TinyTable. I can iterate through that list and generate the links, but I can't figure out how to display the table in two columns. table width=100% border=0 cellpadding=4 tr align=left valign=top dtml-in meetingDateTable dtml-if sequence-eventr align=left valign=top/dtml-if td width=50% dtml-var meeting_date /td dtml-if sequence-enddtml-if sequence-even td width=50% !-- an empty cell --/td /tr /dtml-if/dtml-if dtml-if sequence-odd/tr/dtml-if /dtml-in /table regards Max M ___ 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] Storing and Using Object references
If you call /container1/container1a/container2/container2a/item1, you can call methods on anything in the path... You could access it through dtml from 1-2 as dtml-with "container1.container1a.item1"dtml-call method/dtml-with You could get object2 in using getItem... -- Andy McKay. - Original Message - From: "Tom Jenkins" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 8:48 PM Subject: [Zope] Storing and Using Object references Hello all, i have a question and I hope someone can point me in the right direction to solve it. I need one zope object to hold a reference to another zope object so the first object can call methods of the second object. oh, these are python classes. Example: object 1 is : /container1/container1a/item1 object 2 is : /container2/container2a/item1 object1 needs to hold a reference to object2. I'm really stuck on how to store and access object2 from object1. any pointers? Tom Jenkins devis - Development InfoStructure http://www.devis.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 ) ___ 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] HOW TO UNLOCK????
WE NEED TO UNLOCK A VERSION THAT DOES NOT EXIST ANY MORE!! HOW CAN WE DO IT?! A USER DELETED A VERSION THAT SOMEONE ELSE WAS USING, AND WE CAN NOT QUIT THIS VERSION!! AND WE CANNOT UNDO!!! HELP US!! ___ 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] xmldocument
Do you have an example of the XML you are trying to use? File size, in bytes? Just curious, as I have had no problems with XMLDocument (in Zope 2.1.x and 2.2.x) working with newspaper stories from AP online in NITF XML... Sean -Original Message- From: Bak@kedai [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 10, 2001 1:34 AM To: Phil Harris; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [Zope] xmldocument On Wednesday 10 January 2001 16:56, Phil Harris wrote: Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil to say the file is big is an understatement. how can adding a news file be too big for zope to cope? unless the default XML Document is huge. i'll peek at the collector. thanks phil -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine I will follow you! ..Damage Inc ___ 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 )
[Zope] Proximity searches w/ ZCatalog
Supposedly proximity searches are possible... like "FIDELITY within 8 words of MUTUAL FUNDS." Can't find anything in docs. Anybody have a suggestion here... Thanks, Sean = Sean Upton Senior Programmer/Analyst SignOnSanDiego.com The San Diego Union-Tribune 619.718.5241 [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] Proximity searches w/ ZCatalog
Really using ZCatalog? I've never heard of that. There some globbing searches *? etc, but nothing like that is readily apparent from the API. Sounds like an interesting (ie complicated) idea... -- Andy McKay. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 8:41 AM Subject: [Zope] Proximity searches w/ ZCatalog Supposedly proximity searches are possible... like "FIDELITY within 8 words of MUTUAL FUNDS." Can't find anything in docs. Anybody have a suggestion here... Thanks, Sean = Sean Upton Senior Programmer/Analyst SignOnSanDiego.com The San Diego Union-Tribune 619.718.5241 [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 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] Fw: [Zope] HOW TO UNLOCK????
- Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: "Rommel Novaes Carvalho" [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 9:11 AM Subject: Re: [Zope] HOW TO UNLOCK Please dont post in CAPS, you are more likely not to get a response. Heres one idea, the versioning comes from cookies. What error do you get on the Undo? Have you tried to Undo everything after the deletion of the version? Make yourself a cookie for your browser matching the offending version. Its simply of the format: NameZope-Version ValueUrl to version object, eg: /testing, /foo/testing. You are then in the version, and should be able to Undo. -- Andy McKay. - Original Message - From: "Rommel Novaes Carvalho" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 8:27 AM Subject: [Zope] HOW TO UNLOCK WE NEED TO UNLOCK A VERSION THAT DOES NOT EXIST ANY MORE!! HOW CAN WE DO IT?! A USER DELETED A VERSION THAT SOMEONE ELSE WAS USING, AND WE CAN NOT QUIT THIS VERSION!! AND WE CANNOT UNDO!!! HELP US!! ___ 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] Proximity searches w/ ZCatalog
[EMAIL PROTECTED] wrote: Supposedly proximity searches are possible... like "FIDELITY within 8 words of MUTUAL FUNDS." Can't find anything in docs. Anybody have a suggestion here... Yeah, I think you'd put "FIDELITY ... MUTUAL FUNDS" in the search box. I think Dieter Maurer [EMAIL PROTECTED] wrote the code, so he's probably a good person to speak to :-) cheers, Chris ___ 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] Storing and Using Object references
Hi Andy, Thanks for the feedback. Yes I see that I can call the methods using the url (which will give me the object) but I thought that was only in dtml. I need to access the object in my python code. that's the struggle I'm having. or did I miss something in your response? Tom "Andy McKay" wrote: Subject: Re: [Zope] Storing and Using Object references Date: Wed, 10 Jan 2001 08:56:25 -0800 From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] If you call /container1/container1a/container2/container2a/item1, you can call methods on anything in the path... You could access it through dtml from 1-2 as dtml-with "container1.container1a.item1"dtml-call method/dtml-with You could get object2 in using getItem... -- Andy McKay. - Original Message - From: "Tom Jenkins" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 8:48 PM Subject: [Zope] Storing and Using Object references Hello all, i have a question and I hope someone can point me in the right direction to solve it. I need one zope object to hold a reference to another zope object so the first object can call methods of the second object. oh, these are python classes. Example: object 1 is : /container1/container1a/item1 object 2 is : /container2/container2a/item1 object1 needs to hold a reference to object2. I'm really stuck on how to store and access object2 from object1. any pointers? Tom Jenkins devis - Development InfoStructure http://www.devis.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] HOW TO UNLOCK????
Did you try deleting the cookie on the browser? Please don't yell. Troy -Original Message- From: Rommel Novaes Carvalho [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 10, 2001 10:28 AM To: '[EMAIL PROTECTED]' Subject: [Zope] HOW TO UNLOCK WE NEED TO UNLOCK A VERSION THAT DOES NOT EXIST ANY MORE!! HOW CAN WE DO IT?! A USER DELETED A VERSION THAT SOMEONE ELSE WAS USING, AND WE CAN NOT QUIT THIS VERSION!! AND WE CANNOT UNDO!!! HELP US!! ___ 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] Storing and Using Object references
In python its even easier, and depends what you are doing. Basically you want to get a handle to another object so you can do something along the lines of obj = self.container1.containter1a.item1 result = obj.mymethod() there are many funky variations on that of course. There's also interfaces such as REQUEST.resolve_url, _getOb, getItem that you may want to look into. -- Andy McKay. - Original Message - From: "Tom Jenkins" [EMAIL PROTECTED] To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 10:54 PM Subject: Re: [Zope] Storing and Using Object references Hi Andy, Thanks for the feedback. Yes I see that I can call the methods using the url (which will give me the object) but I thought that was only in dtml. I need to access the object in my python code. that's the struggle I'm having. or did I miss something in your response? Tom "Andy McKay" wrote: Subject: Re: [Zope] Storing and Using Object references Date: Wed, 10 Jan 2001 08:56:25 -0800 From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] If you call /container1/container1a/container2/container2a/item1, you can call methods on anything in the path... You could access it through dtml from 1-2 as dtml-with "container1.container1a.item1"dtml-call method/dtml-with You could get object2 in using getItem... -- Andy McKay. - Original Message - From: "Tom Jenkins" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 8:48 PM Subject: [Zope] Storing and Using Object references Hello all, i have a question and I hope someone can point me in the right direction to solve it. I need one zope object to hold a reference to another zope object so the first object can call methods of the second object. oh, these are python classes. Example: object 1 is : /container1/container1a/item1 object 2 is : /container2/container2a/item1 object1 needs to hold a reference to object2. I'm really stuck on how to store and access object2 from object1. any pointers? Tom Jenkins devis - Development InfoStructure http://www.devis.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 ) ___ 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] raw search on a ZClass
Hi! I have some ZClass istances that are catalog-aware. Someone knows how to do raw (full text) searches over all the property values of the istances? I have tried the "raw" index trick used for other object types but without success. Or maybe another way to do the thing . Thanks in advance Alberto ___ 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] Design/DTML question
At 1/10/01 04:44 PM, Max Mller Rasmussen wrote: From: Timothy Wilson [mailto:[EMAIL PROTECTED]] Right now, I've got the dates stored in a TinyTable. I can iterate through that list and generate the links, but I can't figure out how to display the table in two columns. alternating column solution by Max M deleted for brevity Or, if you insist that dates flow down the columns like I do, you could use this untested revision of Max's solution: table width=100% border=0 cellpadding=4 tr align=left valign=top td width=50% dtml-in meetingDateTable dtml-if "_.int(_['sequence-index'])*2==_.int(_['count-id']) or _.int(_['sequence-index'])*2==_.int(_['count-id'])+1" /tdtd width=50% !-- moved to next column -- /dtml-if dtml-var meeting_datebr /dtml-in /td /tr /table Gosh, wouldn't it be nice to have a sequence-midpoint ? But then somebody would surely want a sequence-first-quartile and so on :-) -- Dennis Nichols [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] ZGDChart
hi there, a great product, just i want to have a form to enter some parameters for the SQL Method call. since zgdchart-product calls the SQL Method i don't know how to pass the parameters. does anybody has an idea? thanks olaf -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Marc Zanger Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.soli-con.com begin:vcard n:Zanger;Olaf Marc tel;cell:+41-76-572 9782 tel;work:+41-31-332 9782 x-mozilla-html:FALSE url:www.soli-con.com org:soli-con Engineering Zanger adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland version:2.1 email;internet:[EMAIL PROTECTED] title:Dipl.-Ing. note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A x-mozilla-cpt:;-32176 fn:Olaf Zanger end:vcard
Re: [Zope] inserting half a dtml tag into a zclass
- Original Message - From: Dieter Maurer [EMAIL PROTECTED] To: Tim Hicks [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, December 29, 2000 9:38 AM Subject: Re: [Zope] inserting half a dtml tag into a zclass Tim Hicks writes: This is a multi-part message in MIME format. --=_NextPart_000_0009_01C07071.533E96C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable You are here long enough: you should know, we do not like MIME messages. My apologies. You're right, I do know better... my mistake. Also, apologies for the delayed reply, I've been away. ... isolating privacy checks ... dtml-var privacy dtml-var standard_html_header dtml-var standard_html_footer /dtml-if I know about 2 possible approaches: I. let your "privacy" method return a value (using "dtml-return") and check it above: dtml-if privacy ...header... ... ...footer... /dtml-if I've gone for a 'method' based on this first idea of yours. Here is what appears in each zclass instance. dtml-call privacy dtml-if "available == 1" dtml-call "RESPONSE.redirect(restricted+'/restricted.html')" dtml-else dtml-var standard_html_header dtml-var standard_html_footer /dtml-if And here is the privacy method. dtml-call "REQUEST.set('available', 0)" dtml-if "propertyLabel(availability) == 'private'" dtml-call "REQUEST.set('available', 1)" /dtml-if dtml-call "REQUEST.set('dom', _.string.split(REQUEST.REMOTE_ADDR, '.'))" dtml-if "dom[0] == '192'" dtml-if "dom[1] == '168'" dtml-call "REQUEST.set('available', 0)" /dtml-if /dtml-if dtml-in PARENTS dtml-let PARENT="_.getitem('sequence-item')" dtml-if "PARENT.hasProperty('dehs_site_root_folder')"dtml-call "REQUEST.set('restricted', PARENT.absolute_url())"/dtml-if /dtml-let /dtml-in It's not perfect (that would be when there is nothing for the user to break in each instance), but it's better than it was and also allows me to edit only one privacy method to change the access rights. II. I think (this implies, I am not sure), that ZPublisher translates exceptions into HTTP response codes. This would mean, you could try: In your "privacy" method: dtml-call "RESPONSE.redirect(...)" dtml-raise type="Redirect"/dtml-raise in your other objects: dtml-call privacy ...header... ...footer... You've lost me a bit there. Where am I actually checking to see if the user has access rights? Cheers tim ___ 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] reindex when a zclass is edited
I know this has been asked numerous times before (once by me!), and I'm sorry to cover the same ground again, but I've spent all afternoon searching through the list archives to no avail. I have a zclass that is catalogaware (selected first and all that). When I add an instance, it gets cataloged and all is fine. I followed the how to (http://www.zope.org/Members/AlexR/CatalogAware) and successfully made my instance get reindexed when the properties are changed, but I can't for the life of me figure out or find anywhere that can tell me how to make the instance get reindexed when it is edited. I'm assuming that it is similar to the process for reindexing when the properties are changed, but I'm just not sure of the details. If it's not too much trouble, could someone give me detailed instructions (or a link) on how to do this. I'd really appreciate it. cheers tim ___ 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] Design/DTML question
On Wed, 10 Jan 2001, Dennis Nichols wrote: Or, if you insist that dates flow down the columns like I do, you could use this untested revision of Max's solution: table width=100% border=0 cellpadding=4 tr align=left valign=top td width=50% dtml-in meetingDateTable dtml-if "_.int(_['sequence-index'])*2==_.int(_['count-id']) or _.int(_['sequence-index'])*2==_.int(_['count-id'])+1" /tdtd width=50% !-- moved to next column -- /dtml-if dtml-var meeting_datebr /dtml-in /td /tr /table This doesn't seem to work. The if statement only evaluates to true the first time through the loop. I agree that the dates must flow down, so don't I need to have some way to do the following: table dtml-in meetingDateTable tr tddtml-var meeting_date/td tddtml-var meeting_date[some later index]/td /tr /dtml-in /table It's the [some later index] part that would seem to be the bugger. Doable? Perhaps this would be a perfect application for a PythonScript? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ [EMAIL PROTECTED] | dtml-var pithy_quote | http://linux.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] Trouble with dates in an External Method
try this kind of whacky line: from DateTime.DateTime import DateTime you can then do date1= DateTime(str1) date2= DateTime(str2) if date1==date2: ... -- Andy McKay. - Original Message - From: "Steven Grimes" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 09, 2001 10:43 PM Subject: [Zope] Trouble with dates in an External Method I'm having trouble using dates in an external method. I can't get it to import the python DateTime module. I need to compare two dates which are in string form in the external method. I know that this isn't a good description of what I'm trying to do but I'm new to Zope development. If this should go to a different mailing list please let me know. Thanks in advance for any help, Steven ___ 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] reindex when a zclass is edited
Tim Hicks wrote: I can't for the life of me figure out or find anywhere that can tell me how to make the instance get reindexed when it is edited. I'm assuming that it is similar to the process for reindexing when the properties are changed, but I'm just not sure of the details. If it's not too much trouble, could someone give me detailed instructions (or a link) on how to do this. I'd really appreciate it. In your method which is called by your edit form, insert a dtml-call "this().reindex_object()" after updating the properties. Eg, in my manage_edit method I have dtml-call "propertysheets.Base.manage_editProperties(REQUEST)" dtml-call "propertysheets.Facility.manage_editProperties(REQUEST)" dtml-call "this().reindex_object()" Regards, Ivan ___ 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] ZWikiWebs Product
Off the top of my head - you don't mention whether they have Add ZWiki Webs permission - presumably they do are you using the zwikiwebs.zexp shipped with zwiki ? The separate zwikiwebs product is due to be retired and not recommended. -Simon ___ 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] Storing and Using Object references
Tom Jenkins wrote: Hello all, i have a question and I hope someone can point me in the right direction to solve it. I need one zope object to hold a reference to another zope object so the first object can call methods of the second object. oh, these are python classes. Example: object 1 is : /container1/container1a/item1 object 2 is : /container2/container2a/item1 object1 needs to hold a reference to object2. I'm really stuck on how to store and access object2 from object1. any pointers? I think what you're looking for is getPhysicalPath() and unrestrictedTraverse(). Store object2.getPhysicalPath(), which returns a tuple, in object1. To find object2 again, call object1.unrestrictedTraverse(stored_physical_path). Note that this only works in Zope 2.2.x+. Shane ___ 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] slow DocumentTemplate (dtml) import speed
Federico Grau writes: ... import of "DocumentTemplate" in CGI script takes too much time ... Check whether your Web Server supports FCGI. If the Web Server is Apache, then there are several Apache modules to integrate Python inside Apache. I think Guido van Rossum uses "mod_snake". Search "comp.lang.python" via "www.python.org" or "dejanews". All these approaches would save you the new process spawn and the build up of its infrastructure all together. If you cannot use any of these options, then the Python "freeze" facility may help you. 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] Memory problems
Tom Deprez writes: ... potential memory leak ... You can use the program "top" to analyse memory usage. This will show you, which process[es] consume memory. If Zope does it, then you can use "Control Panel-Debugging" to get some hints where the leak may be. ... many Zope processes shown by "ps" (Linux) ... Linux implements threads by processes that share memory and other resources. "ps" is still a bit stupid and does not visualize that they are threads rather than normal (full blown) processes. 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] Import problem
Andreas Tille writes: Hello, I tried to create my first class following a tutorial. I exported the rudimentary class via export function. Now I wanted to import it on my laptop to continue working on it but importing failed with the message: The object my_class_name does not support this operation What could be wrong here? ZClasses can only be imported into products. 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] broken products not indicated after Zope 2.2.5 install
Fred Yankowski writes: I just installed a full copy of Zope 2.2.5 onto my NT 4.0 SP 6 machine and then copied over my data.fs* files from Zope 2.2.3. Zope 2.2.5 comes up OK after that, but none of the Products in the Control Panel / Products folder is shown as broken, even though I have yet to copy over the dozen or so products that I had added onto Zope 2.2.3. Of course, other objects that depend on those products fail and some of those do display a "broken" icon and state. But why don't the incomplete products themselves get flagged as broken? This may be part of a (small) Zope misfeature. If exceptions occur during some part of product registration, then Zope appears not to update the product state. I suggest, you activate Zope's logging mechanism (either through an environment variable "STUPID_LOG_FILE=file" or with an equivalent command line argument to "start"). Then restart Zope and look at the log file. If you see exceptions there, file a bug report into the Collector. 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] Trouble with dates in an External Method
Steven Grimes writes: This is a multi-part message in MIME format. --=_NextPart_000_0009_01C07A9E.4B9BD860 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Please do not post MIME messages to this list! ... external method does not import DateTime ... And what error do you get? I tried: from DateTime import DateTime def f(): return DateTime('2001/01/09') and there was no problem. 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] permissions problem upgrading to 2.3.0a1 from 2.1.6
Jerome Alet writes: ... permission problem upgrading ZClasses from 2.1.6 to 2.3a1 ... Are your ZClasses pure Zope ZClasses or do they contain Python based products? There was a big shift in security policy during Zope 2.1.x to Zope 2.2.x. Many Python based products need to be changed in order to be compatible with the new security policy. This is excellently explained in a paper from Brian: "... Upgrading to Zope 2.2 ..." I do not expect, that the behavious will be different, if you upgrade to 2.2.4. 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 )
[Zope] Deleting a Role Doesn't Appear to Remove Permissions
Today I ran into an issue in Zope where even after you delete a role that the permissions associated with that role exist. If a user has that role assigned to them, whatever permissions where last assigned to that role will be available. To test this, I created a test file with the following code: dtml-if "AUTHENTICATED_USER.has_permission('Set Access Rule',content)" foo /dtml-if I chose Set Access Rule as a permission that is not normally associated with a regular user. Testing this page produced no foo because the user does not have access to the "Set Access Rule" permission on the content object (you could pick any Zope Object to test on). Then I created a test role. I assigned that test role to a user. I again tested the output and got nothing. I then gave the test role the permission to "Set Access Rule". Now when the page is reloaded, foo appears. Here is where it gets interesting. After deleting the test role, foo still appears. This means that the role, while supposedly deleted, still exists and is still assigning permissions. Finally, I create a new role with the same name as the test role I created earlier. This new role had the "Set Access Rule" button already selected--indicating in my mind that the role was never really deleted. If I am correct about this, this means that if we create a role and then delete it, we will need to make sure that the role does not exist for any users or they will continue to have the access that they had before. Has anyone else run into this or seen a reported bug similar? (I searched the Zope Bug Collector to no avail). -Jason ___ 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] Adding many users
Ragnar Beer wrote: Howdy Zopistas and happy new year! I need to add about 150 users to an acl_users folder and I wouldn't like to do it manually since the data already exists in a python list. What would be an elegant way to add them all with a python script? A script to put in lib/python, supplying your own user_role_name and user_list: user_list = ?? user_role_name = ?? import Zope app = Zope.app() folder = app.acl_users for u in user_list: folder._doAddUser(u.name, u.password, (user_role_name,), ()) get_transaction().commit() See how that works? Those first two lines give you the actual database--not just a special view of it but a live connection. From there, you don't use some funny mechanism to get acl_users--it's actually a simple attribute of the root object. Then you modify acl_users however you want and commit the transaction. If any error occurs, the transaction will be aborted and changes made to the database will be forgotten. Beautiful, isn't it? Shane ___ 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] get property of type 'list'
Andrei Belitski writes: I add a list property to a DTML document of type 'tokens' (e.g. '[1, 2, 3]') wenn i try to retrieve it with _.getitem i get '[1,' '2,' '3]' instead of '1' '2' '3' Are you sure, it was '[1,' '2,' '3]' and not ['1', '2', '3', '4']? If it were, it would be really strange, unbelievable. ['1', '2', '3', '4'] would be normal, when you use a list (it definitely is one!) in e.g.: dtml-var "_.getitem('toks')" as a list (of cause) can not be part of a generated HTML page. It must be converted into a string. And the above it the string representation of a list. To get the representation, you seem to favour (though I do not understand why), you could use: dtml-var "_.str(_.getitem('toks'))[1:-1]" This make the string conversion explicitly ("_.str") and then keeps the slice "[1:-1]" which means everything beside the first and last character, i.e. you chop the '[]'. 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] SQL Method, dtml-with and namespace weirdness
Mayers, Philip J writes: I'm wondering if it's a bug in the postgres DA, since I can't reproduce it with a quick gadfly test. I'm just going to try it out now. That would be very astonishing, as a database adapter does not have anything to do with namespaces. 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] dtml-tree and a filtered objectValues
Jim Hebert writes: DMTL method "y": OK, this works: My DTML Method, "y": dtml-return "objectValues(['Folder'])" ... used as: dtml-tree branches_expr="_['y']" ... causes: STRONGError Type: AttributeError/STRONGBR STRONGError Value: __getitem__/STRONGBR I tried to reproduce this in Zope 2.3 CVS. I had to replace "_" by "_vars", as "_" gave me a "NameError: _" (do not know why), but otherwise, it worked. I got your error, too, when I tried 'branches_expr="y"', but that is expected, because in this case, the expression evaluates to a DTML method and does not have a "__getitem__" as required by "tree". 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] inserting half a dtml tag into a zclass
Tim Hicks writes: II. I think (this implies, I am not sure), that ZPublisher translates exceptions into HTTP response codes. This would mean, you could try: In your "privacy" method: dtml-call "RESPONSE.redirect(...)" dtml-raise type="Redirect"/dtml-raise in your other objects: dtml-call privacy ...header... ...footer... You've lost me a bit there. Where am I actually checking to see if the user has access rights? When I use "", this means something you have provided or will fill in with application specific code. Thus, in your privacy method: !-- do your checks -- !-- you come here, when they fail -- dtml-call "RESPONSE.redirect(...)" dtml-raise type="Redirect"/dtml-raise 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] REPOST: dtml-with doesn't work
Usually, I complain that problem reports are too terse. But, your's was very big, such that I did not read it carefully. It is very difficult to get it right for everyone. Just a remark: SQL methods do *NOT* look at the DTML namespace *AT ALL*, just at REQUEST (or the expliciitly passed keyword arguments). Thus, "dtml-with", "dtml-let" and friends are all ineffective with respect to ZSQL methods. May be, that explains your problem. May be not, as I am not sure, that you need the values indeed inside a ZSQL method. I can assure you: "dtml-with" does work. 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] Proximity searches w/ ZCatalog
[EMAIL PROTECTED] writes: Supposedly proximity searches are possible... like "FIDELITY within 8 words of MUTUAL FUNDS." Can't find anything in docs. Anybody have a suggestion here... Zope supports some proximity searches, but it provides far less control than you ask for. The proximity operator is "...". It is essentially an "and" with a score depending on the distance. You will not get more control. 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] Memory problems
Dieter wrote: "ps" is still a bit stupid and does not visualize that they are threads rather than normal (full blown) processes. ps -axf ? Dimitris http://atlas.central.ntua.gr:8000 ___ 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] permissions problem upgrading to 2.3.0a1 from 2.1.6
On Wed, Jan 10, 2001 at 09:49:53PM +0100, Dieter Maurer wrote: Jerome Alet writes: ... permission problem upgrading ZClasses from 2.1.6 to 2.3a1 ... Are your ZClasses pure Zope ZClasses or do they contain Python based products? They contain some PythonMethods (not Scripts !), external methods, but the method which poses a problem is pure DTML. There was a big shift in security policy during Zope 2.1.x to Zope 2.2.x. Many Python based products need to be changed in order to be compatible with the new security policy. This is excellently explained in a paper from Brian: "... Upgrading to Zope 2.2 ..." I thought I've already read it IIRC, but I'll reread it more carefully ASAP. Thanks for your help. Jerome Alet ___ 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] broken products not indicated after Zope 2.2.5 install
I activated Zope logging as you suggested and restarted Zope, but the logfile does not report any exceptions. It only contains routine startup messages such as "ZServer HTTP server started ...". And the Products list still makes it look like they're all OK, when many are in fact broken by virtue of being completely missing in the lib/python/Products directory. On Wed, Jan 10, 2001 at 07:53:02PM +0100, Dieter Maurer wrote: Fred Yankowski writes: I just installed a full copy of Zope 2.2.5 onto my NT 4.0 SP 6 machine and then copied over my data.fs* files from Zope 2.2.3. Zope 2.2.5 comes up OK after that, but none of the Products in the Control Panel / Products folder is shown as broken, even though I have yet to copy over the dozen or so products that I had added onto Zope 2.2.3. Of course, other objects that depend on those products fail and some of those do display a "broken" icon and state. But why don't the incomplete products themselves get flagged as broken? This may be part of a (small) Zope misfeature. If exceptions occur during some part of product registration, then Zope appears not to update the product state. I suggest, you activate Zope's logging mechanism (either through an environment variable "STUPID_LOG_FILE=file" or with an equivalent command line argument to "start"). Then restart Zope and look at the log file. If you see exceptions there, file a bug report into the Collector. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ 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] Proximity searches w/ ZCatalog
Chris Withers writes: [EMAIL PROTECTED] wrote: Supposedly proximity searches are possible... like "FIDELITY within 8 words of MUTUAL FUNDS." Can't find anything in docs. Anybody have a suggestion here... Yeah, I think you'd put "FIDELITY ... MUTUAL FUNDS" in the search box. I think Dieter Maurer [EMAIL PROTECTED] wrote the code, so he's probably a good person to speak to :-) No, I just looked for bugs in it and found several. It is almost as you described: the proximity operator is "..." you can not control the distance "..." is effectively an "and" with a high score when the terms are near together and a lower score for higher distances term in "..." are effectively combined with "...", thus: '"bear wine champagner"' is equivalent to 'bear ... wine ... champagner' ZCatalog would interpret "FIDELITY ... MUTUAL FUNDS" as "(FIDELITY ... MUTUAL) or FUNDS" The nearest result what "sean" asked for, would probably be 'FIDELITY ... "MUTUAL FUNDS"', which is equivalent to 'FIDELITY ... (MUTUAL ... FUNDS)'. I have not too much confidence in ZCatalog (yet ; this may change now that Chris P is responsible for it). I doubt, it will implement "A ... B ... C" sensefully. It is a big question, all together, whether a binary operator is the correct choice for proximity. 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] MySQLDA and MySQL-python - patch needed?
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 10, 2001 9:30 AM To: [EMAIL PROTECTED] Subject: [Zope] MySQLDA and MySQL-python - patch needed? My Zope-MySQL connection is still not quite working. It appears that the request from Zope is reaching MySQL and it if is an UPDATE or INSERT query it executes properly on the MySQL side. However, SELECT queries and similar are not getting their information back to Zope from MySQL. Is there some patch I am missing here? Anybody know how to fix this? FYI: I installed from these rpms ftp://ftp.logicetc.com/pub/Zope/RPMS/MySQL-python-0.2.1-1.i386.rpm ftp://ftp.logicetc.com/pub/Zope/RPMS/Zope-ZMySQLDA-1.2.0-1.i386.rpm This did not install into my Zope installation directory, so I used a symbolic link in my Zope Products directory that points to the directory of MySQLDA install. Could this be the cause? Perhaps information that should be returned from MySQL is getting lost on the return trip. If so, how would I fix it? Any ideas? The RPMS install the DA where the Zope RPMS install Products. I actually put my products in the same place (RPMS or not) and use symbolic links for the different instances of Zope I have running, so I know symbolic links will work. If DA product is showing not broken in the Control Panel, then it was installed properly. Are you getting any error messages? How do you know the information is not getting back to Zope? When you test the queries on the connection management screen, do you get results? ___ Ron Bickers Logic Etc, Inc. [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] Design/DTML question
At 1/10/01 01:22 PM, Timothy Wilson wrote: On Wed, 10 Jan 2001, Dennis Nichols wrote: Or, if you insist that dates flow down the columns like I do, you could use this untested revision of Max's solution stuff removed This doesn't seem to work. The if statement only evaluates to true the first time through the loop. Because the objects in the loop had no 'id' attribute? In any case, here's a complete tested example: dtml-var standard_html_header dtml-call "REQUEST.set('meetingDateTable',['first','second','third','fourth','fifth'])" table border=1 cellpadding=4 tr align=left valign=top td width=50% dtml-in meetingDateTable dtml-if "_.int(_['sequence-index'])*2==_.len(meetingDateTable) or _.int(_['sequence-index'])*2==_.len(meetingDateTable)+1" /tdtd width=50% !-- moved to next column -- /dtml-if dtml-var sequence-itembr /dtml-in /td /tr /table dtml-var standard_html_footer -- Dennis Nichols [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] dtml-tree and a filtered objectValues
On Wed, 10 Jan 2001, Dieter Maurer wrote: I tried to reproduce this in Zope 2.3 CVS. Sorry, shoulda mentioned, this error came from 2.2.4, and apologies for not testing against at least 2.2.5 first, I managed to miss its release entirely... (I still haven't gotten around to installing it so I can't say if it's mysteriously fixed in 2.2.5 or what.) On that note, if I have a (different) 2.1.6 site I'm about to take down and migrate to a current release, should I go with 2.2.5 or try to track 2.3 CVS? I was planning on going with 2.2.x, but if the version in cvs is _more_ mature than the previous release... Thanks, jim ___ 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 )