Re: [Zope-dev] Store values thread-wide ?
Look into one of the many session products. There's a proposal about bringing this into the Zope core too. Have a look on dev.zope.org. cheers, Chris Martin Grönemeyer wrote: Hello everyone, I'm playing around with Zope-Objects and find out, that the SecurityManager holds it's informations only for one request. If the Zope-Publishing starts, an existing SecurityManager gets destroyed via __bobo_before__ (am i right ?). In the next step, a SecurityManager-Object is instanciated by the validated_hook in the traverse-method of the BaseRequest. In my own methods i can now get the security-manager and set own properties in this object. I know, this is dirty and i won't use it in real life, but has anyone an other idea how to store informations thread-wide ? Hope you won't kill me. Martin i.A. Martin Grönemeyer Technik || | || c o m.u n i t G m b H ||| | | || | | | | | | | | http://www.comunit.de/ mailto:[EMAIL PROTECTED] Eiffestr. 598 20537 Hamburg | Germany Fon +49 +40 | 21 11 05 25 Fax +49 +40 | 21 11 05 26 ___ 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 )
[Zope-dev] It's been a while
It's been a while since i've had time to explore ZPatterns - and now the time has come that I am considering to base development for a new project on ZPatterns. I think I'm better prepared now - I read Coad's Object Models, and implemented a data management layer in Delphi. The project envolves Customer Relationship Management - like openticket, but I don't like openticket's tight coupling with the SQL databases. First stupid question: Are ZClasses based on Dataskins PD (Problem Domain) objects or DM (Data Management) objects? Can somebody possible categorize the main classes in ZPatterns according to Problem Domain, User Interface, Data Management? Would it be safe to base development on ZPatterns if I want to use an SQL RDBMS as storage and ZPatterns as DataManagement layer ie. is ZPatterns stable engough? Roché ___ 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] Debugging ConflictErrors
Hi John, This is one of the problems with SkinScript, and I've not found any great way to sort through it. Here are my two (three?) cents worth 1) Break the SkinScript triggers down to the simplest possible event, and test them individually. If this is not possible, then debug the trigger with a 'pseudo' event that you can generate deliberately. 2) Try Steve A's DummyDataSkin from his add-on utilities. It can be a great help in sorting out what's going on 3) Get down to the debugger. It's not as easy as debugging 'plain' zope since the 'trigger' objects are 'compiled' but you should at least be able to step through a 'commit' and see when they are hitting exceptions etc... -steve "John" == John Eikenberry [EMAIL PROTECTED] writes: John Hey all, John Using ZPatterns, I have a set of specialists/racks/dataskins John that have a dependency relation. So I've used triggers to John chain deletes in an appropriate way. I won't go into a lot John of detail here as there is quite a bit of code, and I figure John I'm the best suited to debug it. John My problem is I can't get a hold on where the problem John is... all the triggers and appropriate manage_delete's are John getting called. I've checked to make sure I'm not modifying John something already marked for deletion. I don't manually John commit at any point and there are no other threads getting John run. Are there any good heuristics I can use to figure out John what the problem is? I'm sure others have run into John ConflictErrors before, how have you debugged them? John Thanks in advance for any tips... John -- John John Eikenberry [[EMAIL PROTECTED] - http://zhar.net] John __ John "A society that will trade a little liberty for a little John order will deserve neither and lose both." --B. Franklin John ___ Zope-Dev John maillist - [EMAIL PROTECTED] John http://lists.zope.org/mailman/listinfo/zope-dev ** No cross John posts or HTML encoding! ** (Related lists - John http://lists.zope.org/mailman/listinfo/zope-announce John 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] It's been a while
Hi Roche, PJE produced some great comments about this in reaction to my lame attempt at an example. There also some good discussion about other questions on the list. Here are a few choice posts: http://lists.zope.org/pipermail/zope-dev/2000-October/007232.html http://lists.zope.org/pipermail/zope-dev/2000-October/007205.html http://lists.zope.org/pipermail/zope-dev/2000-October/007287.html http://lists.zope.org/pipermail/zope-dev/2000-October/007289.html hope that help... sometime (soon?) I hope to get a chance to re-work the example with references to these posts, plus fixes to make the example 'fit' the model. Also.. I want to incorporate another specialist to demonstrate interapplication integration. -steve "Roch'e" == Roch'e Compaan [EMAIL PROTECTED] writes: Roch'e It's been a while since i've had time to explore ZPatterns Roch'e - and now the time has come that I am considering to base Roch'e development for a new project on ZPatterns. Roch'e I think I'm better prepared now - I read Coad's Object Roch'e Models, and implemented a data management layer in Delphi. Roch'e The project envolves Customer Relationship Management - Roch'e like openticket, but I don't like openticket's tight Roch'e coupling with the SQL databases. Roch'e First stupid question: Are ZClasses based on Dataskins PD Roch'e (Problem Domain) objects or DM (Data Management) objects? Roch'e Can somebody possible categorize the main classes in Roch'e ZPatterns according to Problem Domain, User Interface, Roch'e Data Management? Roch'e Would it be safe to base development on ZPatterns if I Roch'e want to use an SQL RDBMS as storage and ZPatterns as Roch'e DataManagement layer ie. is ZPatterns stable engough? Roch'e Roché Roch'e ___ Zope-Dev Roch'e maillist - [EMAIL PROTECTED] Roch'e http://lists.zope.org/mailman/listinfo/zope-dev ** No Roch'e cross posts or HTML encoding! ** (Related lists - Roch'e http://lists.zope.org/mailman/listinfo/zope-announce Roch'e 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 )
[Zope-dev] RFC: Fishbowl proposal, CorbaClientIntegration
At the request of a Zopista who found my earlier work toward Zope-CORBA integration, I have created a fishbowl proposal at: http://dev.zope.org/Wikis/DevSite/Proposals/CorbaClientIntegration Tres. ___ 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] Fw: 2gb file size
Thank you everyone for your help. I truncated the file and restarted Zope successfully. I had a brief period of problems when I forgot use binary mode for truncating the file - duh. Anyway, I am running 2.2.1 and it doesnt work with a 2gb file. I didnt analyse where the problem lies, however I do believe its a python issue. Thanks. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Itamar Shtull-Trauring" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 05, 2000 2:37 AM Subject: Re: [Zope-dev] Fw: 2gb file size Shane Hathaway wrote: Are you running Zope 2.2.1 or later? There were pointer arithmetic errors that occurred on earlier versions, even with operating systems that support 2 GB files. So on W2K, Zope can have 2GB databases? I'd really like to hear if you get it to work Andy (or if anyone else did.) -- Itamar S.T. [EMAIL PROTECTED] Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C ___ 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] ZClasses not copyable - why?
Philipp Auersperg wrote: It is not posible to copy ZClasses, when I try to copy a ZClass in the Management Interface I get the error:'The Item 'blorf' does not support that operation' I digged into that and found that in the ZClass.py there exists a method def cb_isCopyable: pass I was so crude to replace the pass with a 'return 1', restarted Zope and could now copy ZClasses as I wanted it. - My first question now: (zero indexed questions, I love it) 0.Why are ZClasses not copyable? I don't know. 1.Do I shoot into my foot with my hack or is that OK? I don't know, but I suspect you're aiming the gun in that general direction. - And now my second question I am working on a ZClass-intensive project and sometimes I want to add/remove base classes of a ZClass without redefining the whole class manually. The usual method for this is to subclass from a class you define in Python, then you can change the base classes of that python class easily. For this you need to make a python product with your class in it and initialize the product, registering the class as subclassable. There's probably a how-to on it somewhere, otherwise you can check out lib/python/Products/ZCatalog/__init__.py to see how the ZCatalog class is made ZClass subclassable. -Michel ___ 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] calling dtml method with same name up the hierarchy.
I'd like to be able to nest footers and headers. The thing I would expect is to have a standard_html_footer DTML method in the root, then be able to have standard_html_footers in subfolders which add their stuff, then call the root one. like: /standard_html_footer: (c) 2000 Warner Brothers /merrie_melodies/standard_html_footer: That's all folks! dtml-var standard_html_footer Of course this causes infinite recursion now. So is there a decent way to explicitly call the "super" standard_html_footer, without renaming files or copying data in multiple places? -- Neil Kandalgaonkar [EMAIL PROTECTED] Web Application Developer, ActiveState ___ 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] calling dtml method with same name up the hierarchy.
The following should work in your nested standard_html_footer to call the higher level one without infinite recursion: dtml-with "PARENTS[1]" dtml-var standard_html_footer /dtml-with hth, Casey D. ___ 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] Fw: 2gb file size
I did do a How-to as well http://www.zope.org/Members/andym/2gig -- Andy McKay, Developer. ActiveState. - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 9:26 AM Subject: Re: [Zope-dev] Fw: 2gb file size Thank you everyone for your help. I truncated the file and restarted Zope successfully. I had a brief period of problems when I forgot use binary mode for truncating the file - duh. Anyway, I am running 2.2.1 and it doesnt work with a 2gb file. I didnt analyse where the problem lies, however I do believe its a python issue. Thanks. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Itamar Shtull-Trauring" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 05, 2000 2:37 AM Subject: Re: [Zope-dev] Fw: 2gb file size Shane Hathaway wrote: Are you running Zope 2.2.1 or later? There were pointer arithmetic errors that occurred on earlier versions, even with operating systems that support 2 GB files. So on W2K, Zope can have 2GB databases? I'd really like to hear if you get it to work Andy (or if anyone else did.) -- Itamar S.T. [EMAIL PROTECTED] Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C ___ 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 ) ___ 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] Fw: 2gb file size
Andy McKay wrote: I did do a How-to as well http://www.zope.org/Members/andym/2gig Not long ago I created a wrapper around File objects which automatically splits the file before it reached a predefined limit. It could handle any number of partitioned file segements. I tried it with FileStorage and even integrated it in. That's how we were able to find and fix some arithmetic errors that occurred in FileStorage when reaching the 2GB barrier. If there's interest in the community I can release the code (in fact, there is no dependency on Zope and it's pretty fast.) OTOH, I can verify there are production sites that have succesfully reached around 10 GB in Data.fs size. Shane -- Andy McKay, Developer. ActiveState. - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 9:26 AM Subject: Re: [Zope-dev] Fw: 2gb file size Thank you everyone for your help. I truncated the file and restarted Zope successfully. I had a brief period of problems when I forgot use binary mode for truncating the file - duh. Anyway, I am running 2.2.1 and it doesnt work with a 2gb file. I didnt analyse where the problem lies, however I do believe its a python issue. Thanks. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Itamar Shtull-Trauring" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 05, 2000 2:37 AM Subject: Re: [Zope-dev] Fw: 2gb file size Shane Hathaway wrote: Are you running Zope 2.2.1 or later? There were pointer arithmetic errors that occurred on earlier versions, even with operating systems that support 2 GB files. So on W2K, Zope can have 2GB databases? I'd really like to hear if you get it to work Andy (or if anyone else did.) -- Itamar S.T. [EMAIL PROTECTED] Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C ___ 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 ) ___ 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] ZCatalog index error
Andy, This is a known issue with the catalog (searching the collector for "key error" will show you how common it has been). Chris Petrilli should be checking in some changes to the CVS 2.2 branch (and the trunk?) tomorrow that resolves it. The problem is evidently related to the way catalog.index_object() and catalog.unindex_object() do their thing. I'd advise you live with the issue until 2.2.3 comes out (which should be sometime this week, AFAIK). - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 4:17 PM Subject: [Zope-dev] ZCatalog index error Im running into an odd bug with ZCatalog: I have am running a catalog query and Im getting this message. File D:\zope\lib\python\Products\ZCatalog\Lazy.py, line 193, in __getitem__ File D:\zope\lib\python\Products\ZCatalog\Catalog.py, line 197, in __getitem__ KeyError: 52536 This is the line where it seems to be setting all the scores to one, and I guess it can find the item 52536. else: # otherwise no score, set all scores to 1 r=self._v_result_class(self.data[index]).__of__(self.aq_parent) r.data_record_id_ = index r.data_record_score_ = 1 r.data_record_normalized_score_ = 1 The thing is my catalog is only 17,000 records in size, I have no item 52536 (no wonder it cant find it). I guess my best plan would be somehow to remove that the record for that item if I could... hmm... Any other ideas? -- Andy McKay, Developer. ActiveState. ___ 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] ZCatalog index error
Thanks, will look forward to 2.2.3! I deleted an index and metadata, re created them and recatalogued the affected objects. That seem to solve it in my initial tests... keeping my fingers crossed. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Chris McDonough" [EMAIL PROTECTED] To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, November 06, 2000 3:49 PM Subject: Re: [Zope-dev] ZCatalog index error Andy, This is a known issue with the catalog (searching the collector for "key error" will show you how common it has been). Chris Petrilli should be checking in some changes to the CVS 2.2 branch (and the trunk?) tomorrow that resolves it. The problem is evidently related to the way catalog.index_object() and catalog.unindex_object() do their thing. I'd advise you live with the issue until 2.2.3 comes out (which should be sometime this week, AFAIK). - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 4:17 PM Subject: [Zope-dev] ZCatalog index error Im running into an odd bug with ZCatalog: I have am running a catalog query and Im getting this message. File D:\zope\lib\python\Products\ZCatalog\Lazy.py, line 193, in __getitem__ File D:\zope\lib\python\Products\ZCatalog\Catalog.py, line 197, in __getitem__ KeyError: 52536 This is the line where it seems to be setting all the scores to one, and I guess it can find the item 52536. else: # otherwise no score, set all scores to 1 r=self._v_result_class(self.data[index]).__of__(self.aq_parent) r.data_record_id_ = index r.data_record_score_ = 1 r.data_record_normalized_score_ = 1 The thing is my catalog is only 17,000 records in size, I have no item 52536 (no wonder it cant find it). I guess my best plan would be somehow to remove that the record for that item if I could... hmm... Any other ideas? -- Andy McKay, Developer. ActiveState. ___ 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 ) ___ 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] DataSkins containing DataSkins
I have an idea for getting around my ConflictError problem without a major redesign. But it involves DataSkins containing DataSkins. I have a few questions about this... The base DataSkin will be in a Rack. Would there be any issues in making the embedded DataSkins (contained on the base DataSkins) use this Rack as well? Seems like it might result in the confusion about which DataSkin a PlugIn on the Rack worked with. Would it be better to use Customizers in some way... either have the base Dataskin or perhaps the Specialist also inherit from the Customizer? Phillip, I think you've considered this (didn't you once mention converting PropertySheets to DataSkins). What issues do you think I should be aware of in planning for this. I tried to dig around in the list archives, but I couldn't come up with a search pattern with any applicable hits. So I'm sorry if I'm reiterating something already discussed. Thanks in advance for any help... -- John Eikenberry [[EMAIL PROTECTED] - http://zhar.net] __ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin ___ 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 )