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 )
Re: [Zope] Zope Book Beta
In article [EMAIL PROTECTED], Michel Pelletier [EMAIL PROTECTED] writes Robin Becker wrote: ... I belive all reference to xslt methods has been removed. Python methods will be part of the 2.3 release, and Perl methods are mentioned in the book as being a component add on that must be installed. well I think I read about them in the recently released beta, not how they work, but I didn't pluck the name out of thin air. So is there an alpha of this future zope that we could use to check the book? Check out Zope and Python Methods from CVS. Perl Methods can be downloaded from the Perl wiki on (I believe) dev.zope.org. -Michel I'm using the CVS checkout of Zope2, where are python methods in the CVS tree? -- Robin Becker ___ 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] Help wanted on Zope ZClasses/DTML please.
I have worked out thanks to Seb's comments that the problem I have with the use of manage_delObjects is (I think) that I am passing in the title or id of the object to be deleted rather than the object itself. Not quite... manage_delObjects takes a string which is the id of the object to be deleted. Your example dtml-call "manage_delObjects('the_id')" was passing a string 'the_id' to the method. I might have interpreted what you were trying to do wrongly, but I believe you actually wanted to pass the _value_ of the_id. I want to put the object into the REQUEST so I can still access it from a different namespace - at the point I want to do the deletion, my target object is out of scope. In fact you just have to put the correct string into the REQUEST and then make sure you have the object you're trying to reference in your current namespace, e.g. by using dtml-with foo_namespacedtml-var "manage_delObjects(the_id)"/dtml-with. If you need more help, post the snippet you're working on again. seb. ___ 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] images in directories
Pete Prodoehl wrote: Is it possible to have an image named "image.gif" or "image.jpg" ? (Are file extensions allowed? If so, how are those objects addresses?) dtml-with IMAGES dtml-var image.gif /dtml-with or dtml-var "IMAGES.getitem('image.gif',1)" cheers, Chris Pete -- "Farrell, Troy" wrote: dtml-with IMAGES dtml-var image1 /dtml-with This also works: dtml-var "IMAGES.image1" ___ 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] Swishdot, SiteAccess
Anders Eriksson wrote: What if I want to combine two of the larger products, The Portal ToolKit and the Squishdot. How would one go about to do this? I would like to have the membership and the other parts from PTK added to the Squishdot (or the other way around - which ever is easiest). There are plans a foot for this: http://www.squishdot.org/968089230/index_html ...now if there were just 48hrs in each day ;-) I also wonder: Is there someway I can install the PTK or the Squishdot in the Zope root folder? I wish there was... ideas, anyone? This so that I can use the domain URL without any subfolders. e.g. www.mydomain.org instead of www.mydomain.org/ptk Well, you can get around this using SiteAccess and Apache... 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] how to retrieve variables values from the URL
jacintha menezes wrote: Hi, In lookup query when i give the input as Emp_no submit it , following url comes in the browser address space. http://192.168.222.217:8080/project/Admin/looktool_report?Emp_no=4SUBMIT=Su bmit+Query how can i retrieve the variables values from the URL using dtml tags dtml-var Emp_no cheers, Chruis ___ 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] Newbie question
Hello, i want to view a dtml-document, calling it as a variable. For example: dtml-var standard_html_header h2dtml-var title_or_id/h2 p dtml-var testfile P dtml-var standard_html_footer where this file is called with this string: a href="test3?testfile=Running"test3/A The result i now get is the id, not the content of the file! Thanks, Bruno __ Do You Yahoo!? Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.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 )
Re: [Zope] IIS and Zope share same problem :-S
Pierre-Julien Grizel wrote: Hum... A possible way to solve this problem is to practice the "you can't do ANYTHING but..." policy... And, thus, according proxy roles to the methods that must access it, such as index_html. I know it's constraining but with a little work we can end up with something quite secure secret. It's not secret, you can still use /objectIds and /objectValues to find out about things... Secure, yes it is that. But, it's a lot more than a little work. What I was suggesting was something to do the grunt work of all this with the same outcome. oh well... 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] How to render a HTMLFile in a method in a product
Max Møller Rasmussen wrote: def __call__(self,client=None,mapping={},**kw): This method accepts an object in which it will look up values to insert in the dtml file, and a mapping object (dictionary) that also will look up values to insert. So i guess that is what (None,md) does. But I dont understand what "ignored" does in my method, as it is unused, unless it is used by md Nope, ignored is the client, which you don't need to worry about. def test(self,ignored,md): Furthermore I dont understand what md is. Some kind of mapping object naturally, but where does it come from? pDocumentTemplate.py has one implementation of it. it's a stack of dictionaries, basically... When you do md['key'], it looks for key in the top dictionary, then in the next one down, then in the one below that, etc, and only throws a key error if one can't be found at all... Also what is testisDocTemp supposed to do? This is a bit of ExtensionClass wierdness. Think of it has "give the test object the 'isDocTemp' attribute". If I grep the source a "isDocTemp" shows up but is isn't easy to see what this does either. If some arcane bit of Zope's calling machinery finds this (probably in BaseRequest.py) it sends different parameters to __call__. HTH, 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] Folderish object -API
Hi Zopists, I try to create ISNGFolder class which is subclassed from Zope Folder class. During instantiation of this ISNGFolder class I also try to set permissions ['View', 'Access contents information'] for role 'Content' by calling manage_role('Content', ['View', 'Access contents information']) function of this object. But some error occurs and I don't know python API very well for folderish objects. Can somebody help me, please?? I use Zope 2.1.6 on Linux Debian Below you can see part of my python product for folderish object and error output of Zope. Begin of code: manage_addISNGFolderForm=HTMLFile('addFolder', globals()) def manage_addISNGFolder(self, cz_id, title='', key_words=[], header='', footer='', createPublic=0, createUserF=0, REQUEST=None): """Add a new 'ISNG Folder' object with id *id*.""" author = repr(REQUEST.AUTHENTICATED_USER) id = cz_id2id(cz_id) ob=ISNGFolder() ob.id = id ob.cz_id = cz_id ob.title = title ob.creation = DateTime.DateTime(time.time()) ob.author = author ob.modifier = author ob.key_words = key_words ob.header = header ob.footer = footer self._setObject(id, ob) ob.manage_role('Content', ['Access contents information', 'View']) if REQUEST is not None: return MessageDialog( title = 'Add ISNGFolder', message = 'New ISNGFolder %s was added.' % ob.getProperty('cz_id'), action = './addFolder' ) class ISNGFolder(Folder): """ISNGFolder class. Is created by inheritance from Folder Zope object.""" meta_type = 'ISNG Folder' __ac_permissions__ = ( ('View', ('manage_infoISNGForm',)), ) _properties = ( {'id':'title', 'type':'string', 'mode':'w'}, {'id':'cz_id', 'type':'string', 'mode':'w'}, {'id':'author', 'type':'string', 'mode':'w'}, {'id':'modifier', 'type':'string', 'mode':'w'}, {'id':'key_words', 'type':'lines', 'mode':'w'}, {'id':'header', 'type':'text', 'mode':'w'}, {'id':'footer', 'type':'text', 'mode':'w'} ) _ManageOptions = ( {'label':'Edit ISNG', 'action':'manage_editISNGForm'}, {'label':'Info ISNG', 'action':'manage_infoISNGForm'}, {'label':'Header ISNG', 'action':'manage_editHeaderISNGForm'}, {'label':'Footer ISNG', 'action':'manage_editFooterISNGForm'}, {'label':'Permissions ISNG', 'action':'manage_permissionsFrameISNGForm'}, ) Error output of Zope: Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: aq_acquire Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/www/Zope-2.1.6/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_addISNGFolder) File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_addISNGFolder) File /usr/local/www/Zope-2.1.6/lib/python/Products/ISNG/ISNG.py, line 810, in manage_addISNGFolder File /usr/local/www/Zope-2.1.6/lib/python/AccessControl/Role.py, line 179, in manage_role (Object: ElementWithAttributes) File /usr/local/www/Zope-2.1.6/lib/python/AccessControl/Role.py, line 137, in ac_inherited_permissions (Object: ElementWithAttributes) File /usr/local/www/Zope-2.1.6/lib/python/OFS/ObjectManager.py, line 173, in _subobject_permissions (Object: ElementWithAttributes) AttributeError: (see above) -- Petr Knpek NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic e-mail: mailto:[EMAIL PROTECTED] tel:+420-5-43 554 150 FAX:+420-5-43 554 214 "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope and Sybase Stored Procedures
Hi, we are using Zope 2.1.6 with Sybase 11.9.2 on Suse Linux, and calling stored procedures just works fine. e.g. create procedure csp_add_barcode @tableName varchar(12), @barcode numeric(8) OUT AS insert into BarcodeItem (tableName) values (@tableName) select @barcode = @@identity This is a stored procedure that inserts one row into the table 'BarcodeItem' and returns an automatically created unique identity key as a result named 'barcode'. The ZSQL methods takes one parameter 'tableName' and returns the resulting 'barcode' like a normal select statement does. The query template simply is: csp_add_barcode dtml-sqlvar tableName type=string Hope that helps. Btw, Zope 2.2.0 has a bug in connecting to SybaseDA which is reported to digicool. Should be fixed in the next release. If interested for the fix, send me a mail. Ralph -- Ralph Heinkel Cenix Bioscience GmbH Director of the IT-UnitTel : +49 6221/387 915 Meyerhofstr. 1 Fax : +49 6221/387 971 69117 Heidelberg, Germany eMail: [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] objectValues type?
I have this simple tree: dtml-tree branches="objectValues" skip_unauthorized="1" input type="checkbox" name="delItems:list" VALUE="dtml-var id" a target=main href="dtml-absolute_url;"dtml-var title_or_id/a /dtml-tree The anchor's target is main. But it if it is a Folder I want the target to be self. And I want to skip some items. How do I return the objectType (eg Folder, Document, Method) so I can alter the anchor, and/or object Properties that I might set to make other decisions? try (untested): dtml-tree branches="objectValues" skip_unauthorized="1" input type="checkbox" name="delItems:list" VALUE="dtml-var id" dtml-if "meta_type != 'Folder'" a href="dtml-absolute_url;"dtml-var title_or_id/a dtml-else a target=main href="dtml-absolute_url;"dtml-var title_or_id/a /dtml-else /dtml-tree with the dtml-if tag you can test for other properties in the same way. hth Rik ___ 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] Sorting 'in'
Hi! I need a query sorted by 2-3 different attributes. The 'in' sort only lets me do it by one. Is there a way to get around it? TIA -y ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things?Cyclops: Well, what would you prefer? Yellow spandex?
[Zope] Properly intergating reportlab and Zope
Hi all! I'm still trying to get this to work, so I'm going to try the lists for assistance again. TIA!!! I am working on a project using zope and reportlab. The goal is to have uploaded images end up in a formatted PDF file. I have both of these halves completed, I need to figure out how to connect them. I have been using SquishFile.py as the wrapper around uploaded images, as is done in squishdot. The few image types I have tried have displayed fine on screen, but PIL/Reportlab is not able to recognise the image. I know how to get an image into reportlab from the filesystem, but is there a way to use one that is in the Zodb? How would you go about wrapping the file in a PIL.Image() ? I've been trying things similar to: cardimage=PIL.Image.open(self.uploadedimage) c.drawInlineImage(cardimage, 1,1) This gives an error in reportlab.canvas.convert() I tried using PIL.image.fromstring(), but I can't quite get it to work out: filebytes=[str(self.uploadedimage.file_bytes()), 'bytes'] cardimage=PIL.Image.fromstring(self.uploadedimage.content_type(), filebytes, self.uploadedimage.file_data()) c.drawInlineImage(cardimage, 1,1) This gives a typeerror: PIL/Image.py, line 848, in new has anyone succesfully done this? can I just Leave the SquishFile wrapper off if it is ONLY going to be images that get uploaded? Thanks for any ideas! -ed- ___ 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] Sorting 'in'
If it's a database query sorting with sql first. i.e. ORDER BY X,Y HTH Dan Yvonne Totty wrote: Hi! I need a query sorted by 2-3 different attributes. The 'in' sort only lets me do it by one. Is there a way to get around it? TIA -y ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? ___ 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] Sorting 'in'
Yes, that is what I am doing, however was wanting to not have to write several Z SQL Methods. 8) ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? If it's a database query sorting with sql first. i.e. ORDER BY X,Y HTH Dan Yvonne Totty wrote: Hi! I need a query sorted by 2-3 different attributes. The 'in' sort only lets me do it by one. Is there a way to get around it? TIA -y ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? ___ 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] Need win32 dll for DynPersist !
Hi all, we need the DynPerisist.dll (Win2000) for presentation purpose. If someone has compilied this dll, would you please mail it to me. (ZPattern 0.4.3 beta 1) Normally we develop on Linux .. ;) . Thanx and greetings from Heidelberg/Germany Micha ___ 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] Need win32 dll for DynPersist !
I bounced him the one I got from Itamar a couple weeks ago. ___ 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] Sorting 'in'
hi yvonne, in your zsql method, you can order by several variables in the same method call. so you can do it all in one method. ciao! greg. Gregory Haley Venaca.com Yvonne Totty wrote: Yes, that is what I am doing, however was wanting to not have to write several Z SQL Methods. 8) ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? If it's a database query sorting with sql first. i.e. ORDER BY X,Y HTH Dan Yvonne Totty wrote: Hi! I need a query sorted by 2-3 different attributes. The 'in' sort only lets me do it by one. Is there a way to get around it? TIA -y ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? ___ 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] recursive constructions
I would like to duplicate a folderish zclass path and copy some properties across from one tree /R/A/B/C to another /L/A/B/C. The request to create an object is http://localhost/R/manage_addProduct/myProd/myProd_factory/myProd_add?id=A,prop=1 I would like to then create /L/A/B/C etc using some kind of recursive scheme, but I don't know how to call a method to do this recursively and maintain the original permissions. Somehow I seem to lose something along the way. the actual sequence of calls would be http://localhost/L/manage_addProduct/myProd/myProd_factory/myProd_add?id=A,prop=1 http://localhost/L/A/manage_addProduct/myProd/myProd_factory/myProd_add?id=B,prop=1 http://localhost/L/A/B/manage_addProduct/myProd/myProd_factory/myProd_add?id=C,prop=1 -- Robin Becker ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Book Beta
Robin Becker wrote: In article [EMAIL PROTECTED], Michel Pelletier [EMAIL PROTECTED] writes Robin Becker wrote: ... I belive all reference to xslt methods has been removed. Python methods will be part of the 2.3 release, and Perl methods are mentioned in the book as being a component add on that must be installed. well I think I read about them in the recently released beta, not how they work, but I didn't pluck the name out of thin air. Ah you are correct, I just removed the references to them. I thought they were purged when we removed the xml chapter. So is there an alpha of this future zope that we could use to check the book? Check out Zope and Python Methods from CVS. Perl Methods can be downloaded from the Perl wiki on (I believe) dev.zope.org. -Michel I'm using the CVS checkout of Zope2, where are python methods in the CVS tree? I'm not sure, I suspect you would ahve to check them out of a branch, and I don't know how to do that from the public CVS. I'll make some inquiries. -Michel ___ 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] Mirroring Zope sites
Hello, I'd like to be able to take a "snapshot" of a Zope site (probably using the recursive "wget") so that it can be served from Apache alone. I'm running into problems coping with files named "x_html" (most notably "index_html") . . . Apache serves up the files as plaintext, so you just get the HTML in your browser window. I've been messing around with srm.conf in my Apache configuration to try and accept "_html" as a valid extention for "text/html" files, but to no avail. Has anyone managed to get Apache to serve "_html" as text/html? Thanks much! -CJ ___ 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] Sorting 'in'
Hi Yvonne, You could use Zieve, (http://www.zope.org/Members/sspickle/Zieve) or you could render the 'order by' part of your clause from a variable in the name space, or possibly the REQUEST itself. There was also a patch submitting at one point that allows variable (and I think multiple) sort keys... -steve "Yvonne" == Yvonne Totty [EMAIL PROTECTED] writes: Yvonne Yes, that is what I am doing, however was wanting to not Yvonne have to write several Z SQL Methods. 8) Yvonne ~~~ Yvonne Totty Yvonne Database Engineer - Wolverine: You Yvonne actually go outside in these things? Cyclops: Well, what Yvonne would you prefer? Yellow spandex? If it's a database query sorting with sql first. i.e. ORDER BY X,Y HTH Dan Yvonne Totty wrote: Hi! I need a query sorted by 2-3 different attributes. The 'in' sort only lets me do it by one. Is there a way to get around it? TIA -y ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? Yvonne ___ Zope Yvonne maillist - [EMAIL PROTECTED] Yvonne http://lists.zope.org/mailman/listinfo/zope ** No cross Yvonne posts or HTML encoding! ** (Related lists - Yvonne http://lists.zope.org/mailman/listinfo/zope-announce Yvonne 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] dtml-in over the output from my method
I am trying to create a zope product in python but have got stuck with using the dtml-in tag to iterate over a method (or is it a function? I get a little mixed up) of my class. Here is the method, def list_messages(self): lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) print num_from_sub self.msgnum = num_from_sub[0] self.msgfrom = 'This is from UNKNOWN' self.msgsub = 'My special subject' return self.msgnum, self.msgfrom, self.msgsub And here isan extract from the dtml file that is supposed to display the output, dtml-in list_messages tr tda href="/spool/dtml-user;/get_message?dtml-msgnum;"dtml-msgfrom;/a/td tda href="/spool/dtml-user;/get_message?dtml-msgnum;"dtml-msgsub;/a/td /tr/dtml-in However, this does not produce the desired effect. I don't know if it is obvious from what I've written, but basically, the three variables (self.msgnum, self.msgfrom and self.msgsub) are supposed to be inserted into the appropriate place in the table, and then the 'for' statement re-executed (producing different values for the variables) with the subsequent values being inserted into the next line of the table etc... until there are no more lines to be read from lr. I'm not sure if that is clear or not, sorry. Obviously, this does not work as the dtml-in simply iterates over each of the returned variables (instead of over the for statement). I can't seem to make it do what I want. Does anyone have any ideas? Much obliged if you do. Cheers tim
Re: [Zope] Folderish object -API
The error would be with aq_acquire, do you have that specified anywhere in your code (eg in the __init__)? -- Andy McKay, Developer. ActiveState. - Original Message - From: "Petr Knapek" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 4:46 AM Subject: [Zope] Folderish object -API Hi Zopists, I try to create ISNGFolder class which is subclassed from Zope Folder class. During instantiation of this ISNGFolder class I also try to set permissions ['View', 'Access contents information'] for role 'Content' by calling manage_role('Content', ['View', 'Access contents information']) function of this object. But some error occurs and I don't know python API very well for folderish objects. Can somebody help me, please?? I use Zope 2.1.6 on Linux Debian Below you can see part of my python product for folderish object and error output of Zope. Begin of code: manage_addISNGFolderForm=HTMLFile('addFolder', globals()) def manage_addISNGFolder(self, cz_id, title='', key_words=[], header='', footer='', createPublic=0, createUserF=0, REQUEST=None): """Add a new 'ISNG Folder' object with id *id*.""" author = repr(REQUEST.AUTHENTICATED_USER) id = cz_id2id(cz_id) ob=ISNGFolder() ob.id = id ob.cz_id = cz_id ob.title = title ob.creation = DateTime.DateTime(time.time()) ob.author = author ob.modifier = author ob.key_words = key_words ob.header = header ob.footer = footer self._setObject(id, ob) ob.manage_role('Content', ['Access contents information', 'View']) if REQUEST is not None: return MessageDialog( title = 'Add ISNGFolder', message = 'New ISNGFolder %s was added.' % ob.getProperty('cz_id'), action = './addFolder' ) class ISNGFolder(Folder): """ISNGFolder class. Is created by inheritance from Folder Zope object.""" meta_type = 'ISNG Folder' __ac_permissions__ = ( ('View', ('manage_infoISNGForm',)), ) _properties = ( {'id':'title', 'type':'string', 'mode':'w'}, {'id':'cz_id', 'type':'string', 'mode':'w'}, {'id':'author', 'type':'string', 'mode':'w'}, {'id':'modifier', 'type':'string', 'mode':'w'}, {'id':'key_words', 'type':'lines', 'mode':'w'}, {'id':'header', 'type':'text', 'mode':'w'}, {'id':'footer', 'type':'text', 'mode':'w'} ) _ManageOptions = ( {'label':'Edit ISNG', 'action':'manage_editISNGForm'}, {'label':'Info ISNG', 'action':'manage_infoISNGForm'}, {'label':'Header ISNG', 'action':'manage_editHeaderISNGForm'}, {'label':'Footer ISNG', 'action':'manage_editFooterISNGForm'}, {'label':'Permissions ISNG', 'action':'manage_permissionsFrameISNGForm'}, ) Error output of Zope: Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: aq_acquire Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/www/Zope-2.1.6/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_addISNGFolder) File /usr/local/www/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_addISNGFolder) File /usr/local/www/Zope-2.1.6/lib/python/Products/ISNG/ISNG.py, line 810, in manage_addISNGFolder File /usr/local/www/Zope-2.1.6/lib/python/AccessControl/Role.py, line 179, in manage_role (Object: ElementWithAttributes) File /usr/local/www/Zope-2.1.6/lib/python/AccessControl/Role.py, line 137, in ac_inherited_permissions (Object: ElementWithAttributes) File /usr/local/www/Zope-2.1.6/lib/python/OFS/ObjectManager.py, line 173, in _subobject_permissions (Object: ElementWithAttributes) AttributeError: (see above) -- Petr Knpek NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic e-mail: mailto:[EMAIL PROTECTED] tel:+420-5-43 554 150 FAX:+420-5-43 554 214 "Perl is worse than Python
Re: [Zope] zope error
It sounds like there is a problem writing to the log file. Im not sure what errorno 9 in IO is but it could be bad filename if you have specified one. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Atomasoft Network President" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, November 04, 2000 9:52 AM Subject: [Zope] zope error Hello, There is a problem with my zope.Whenever someone accesses the server it has an error and shuts down this is the last 2 lines of what it said: File "C:\Program Files\WebSite\ZServer\medusa\logger.py", line 65 in maybe_flush self.file.flush() IOError: [Errno 9] Bad file descriptor How do I fix this? Thanks, Calin ___ 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] Sorting 'in'
Put an argument as sort_order and then your statement as: SELECT * FROM Foo ORDER BY dtml-var sort_order ASC -- Andy McKay, Developer. ActiveState. - Original Message - From: "Yvonne Totty" [EMAIL PROTECTED] To: "Daniel Rusch" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 8:17 AM Subject: RE: [Zope] Sorting 'in' Yes, that is what I am doing, however was wanting to not have to write several Z SQL Methods. 8) ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? If it's a database query sorting with sql first. i.e. ORDER BY X,Y HTH Dan Yvonne Totty wrote: Hi! I need a query sorted by 2-3 different attributes. The 'in' sort only lets me do it by one. Is there a way to get around it? TIA -y ~~~ Yvonne Totty Database Engineer - Wolverine: You actually go outside in these things? Cyclops: Well, what would you prefer? Yellow spandex? ___ 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] catalog DTML Document
Wolfgang Strobl writes: "Finding"a bunch of DTML Documents into a Zcatalog is easy. But how to do that programmatically? I haven't even found a way of doing that for a single DMTL Document. You call the catalog with your search terms as keyword paramters: dtml-in "catalog(principia_search_source='cool and new')" /dtml-in Have a look at the two ZCatalog tutorials on zope.org. 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-in over the output from my method
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Hicks I am trying to create a zope product in python but have got stuck with using the dtml-in tag to iterate over a method (or is it a function? I get a little mixed up) of my class. Here is the method, def list_messages(self): msgList = [] lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) print num_from_sub self.msgnum = num_from_sub[0] self.msgfrom = 'This is from UNKNOWN' self.msgsub = 'My special subject' return self.msgnum, self.msgfrom, self.msgsub return msgList The dtml-in does not call your method for every iteration, it just calls once and then expects a list in return. What you need to do is to create a method that returns a list of objects: def list_messages(self): class msg: def __init__(self, msgnum, msgfrom, msgsub): self.msgnum = msgnum self.msgfrom = msgfrom self.msgsub = msgsub msgList = [] lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) # Oh no ... this wont cut it! #self.msgnum = num_from_sub[0] #self.msgfrom = 'This is from UNKNOWN' #self.msgsub = 'My special subject' #return self.msgnum, self.msgfrom, self.msgsub # Do it like this: msgList.append(msg(num_from_sub[0],'This is from UNKNOWN', 'My special subject')) return msgList ___ 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-in over the output from my method
The problem is the first time your for loop runs it will return to the dtml and will not run anymore. Rather build up a list, or list of objects inside your method and then return. Dtml-in needs to see a list. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Tim Hicks" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 06, 2000 12:45 PM Subject: [Zope] dtml-in over the output from my method I am trying to create a zope product in python but have got stuck with using the dtml-in tag to iterate over a method (or is it a function? I get a little mixed up) of my class. Here is the method, def list_messages(self): lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) print num_from_sub self.msgnum = num_from_sub[0] self.msgfrom = 'This is from UNKNOWN' self.msgsub = 'My special subject' return self.msgnum, self.msgfrom, self.msgsub And here is an extract from the dtml file that is supposed to display the output, dtml-in list_messages tr tda href="/spool/dtml-user;/get_message?dtml-msgnum;"dtml-msgfrom;/a/td tda href="/spool/dtml-user;/get_message?dtml-msgnum;"dtml-msgsub;/a/td /tr /dtml-in However, this does not produce the desired effect. I don't know if it is obvious from what I've written, but basically, the three variables (self.msgnum, self.msgfrom and self.msgsub) are supposed to be inserted into the appropriate place in the table, and then the 'for' statement re-executed (producing different values for the variables) with the subsequent values being inserted into the next line of the table etc... until there are no more lines to be read from lr. I'm not sure if that is clear or not, sorry. Obviously, this does not work as the dtml-in simply iterates over each of the returned variables (instead of over the for statement). I can't seem to make it do what I want. Does anyone have any ideas? Much obliged if you do. 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] catalog DTML Document
On 6 Nov 2000, at 21:46, Dieter Maurer wrote: Wolfgang Strobl writes: "Finding"a bunch of DTML Documents into a Zcatalog is easy. But how to do that programmatically? I haven't even found a way of doing that for a single DMTL Document. You call the catalog with your search terms as keyword paramters: dtml-in "catalog(principia_search_source='cool and new')" /dtml-in Have a look at the two ZCatalog tutorials on zope.org. Who said anything about searching? :-) A ZCatalogs management interface contains a function "Find Items to ZCatalog". This function performs a recursive search and adds all objects matching the specified criteria to the Catalog. This works quite well with DMTL Documents, as long as one does it via the management interface. I asked about how to perform this function (to spell it out again: _adding_ a _DTML Document_) programmatically, i.e. via DTML, of from Python code. There is a How-To "Adding ZClass Instances Programmatically", and a lot of gobbledigoop about when, how and why. But I haven't found anything about how to "index" or "reindex" a plain and simple DTML Document. -- Wolfgang Strobl ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] problems with Openticket in Zope
Hello, I have just installed the Openticket, ticketing system in Zope, but am having some troubles. I can log into it as an ACL user and add a new client to it, but when I try and create a new ticket, I get an error of: Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: 'string' object has no attribute 'date_time_stamp' Traceback (innermost last): File /usr/local/zope/2-1-2/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/2-1-2/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/2-1-2/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/2-1-2/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/2-1-2/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: add_call_post) File /usr/local/zope/2-1-2/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: add_call_post) File /usr/local/zope/2-1-2/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: add_call_post) File /usr/local/zope/2-1-2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: add_call_post) File /usr/local/zope/2-1-2/lib/python/DocumentTemplate/DT_Let.py, line 147, in render (Object: rc="req_fields(REQUEST.form, [('contact_name', 'Contact Name', 'string'), ('problem_summary', 'Problem Summary', 'string')])") File /usr/local/zope/2-1-2/lib/python/Shared/DC/ZRDB/DA.py, line 446, in __call__ (Object: sqlNewTicket) File /usr/local/zope/2-1-2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: string) File /usr/local/zope/2-1-2/lib/python/Products/OpenTicket/OpenTicket.py, line 162, in date_by_db_type (Object: Traversable) AttributeError: (see above) Any one seem this before or have any ideas what might be causing this? The system I'm using is Zope 2.2.2, PoPy-1.3.6, and OpenTicket 1.0b2 on a LinuxPPC system. Thanks! andrew -- Andrew Miles | Systems Administrator IN2 | 205 Hudson Street 7th Floor NYC 10013 Phone 646.613.2027 | Fax 646.613.0648 | Pager 800.776.0376 ___ 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] Help wanted on Zope ZClasses/DTML please.
Thanks for the e-mail Seb. I am afraid I am still having problems here, so I will show my code again, and hopefully you or someone else will be able to help. To recap : I am creating a news page and an interface to edit it using two custom ZClasses, Article and Page. A Page object contains several Articles. The following code is from a script that allows the user to delete an Article from the Page. This method belongs to the Page class, so we are currently in the scope of the Page. This script is supplied with the title of a news article to be deleted, it should then delete the Article from the Page and report back. dtml-var standard_header !-- set this flag to null so I can tell if/when matching article found -- dtml-call "REQUEST.set('id_to_delete','NULL')" !-- retrieve the title of the article to delete -- dtml-let the_match="REQUEST['article_to_delete']" !-- start cycling through Articles looking for a match -- dtml-in objectValues dtml-with sequence-item dtml-with propertysheets dtml-with UAArticleClassPropertySheet !-- now we are looking at the properties of one of the Articles -- dtml-if expr="article_title==the_match" dtml-call "REQUEST.set('id_to_delete',title_or_id)" !-- this is the point where we have located the article to delete. Ideally we should delete it now, but we are still in the scope of the property sheet -- /dtml-if /dtml-with/dtml-with !-- now if we have found a match, we are back in the scope of the objectValues of the Page, so we want to do the deletion. -- dtml-unless expr="REQUEST['id_to_delete']=='NULL'" dtml-let the_id="REQUEST['id_to_delete']" !-- this is the problem line -- dtml-call "manage_delObjects(the_id)" /dtml-let /dtml-unless /dtml-in !-- this last bit just generates HTML to say if deletion done or article not found -- dtml-if expr="REQUEST['id_to_delete']=='NULL'" h2Article not found/h2 PCould not find the article to delete./PPA HREF=editReturn to maintenance page/A/P dtml-else h2Article not deleted/h2 PDeleted article 'dtml-the_match;' (id='dtml-the_id;')./PPA HREF=editReturn to maintenance page/A/P /dtml-if /dtml-let dtml-var standard_footer !-- end of code -- Basically I think I am somehow passing the wrong parameters to manage_delObjects The line dtml-call "manage_delObjects(the_id)" causes an error 'loop over non-sequence' This made me think that the argument has to be a sequence so I tried dtml-call "manage_delObjects('the_id')" but this fails because as you say it looks for an object called the_id and I need to pass in the value of the_id not the name of it. Ideally I want to say dtml-call "manage_delObjects(REQUEST['id_to_delete'])" but again this fails to find the object. Any ideas? Thanks for helping, Alex -Original Message- From: Seb Bacon [mailto:[EMAIL PROTECTED]] Sent: Monday, November 06, 2000 8:50 PM To: Bowyer, Alex; [EMAIL PROTECTED] Subject: RE: [Zope] Help wanted on Zope ZClasses/DTML please. I have worked out thanks to Seb's comments that the problem I have with the use of manage_delObjects is (I think) that I am passing in the title or id of the object to be deleted rather than the object itself. Not quite... manage_delObjects takes a string which is the id of the object to be deleted. Your example dtml-call "manage_delObjects('the_id')" was passing a string 'the_id' to the method. I might have interpreted what you were trying to do wrongly, but I believe you actually wanted to pass the _value_ of the_id. I want to put the object into the REQUEST so I can still access it from a different namespace - at the point I want to do the deletion, my target object is out of scope. In fact you just have to put the correct string into the REQUEST and then make sure you have the object you're trying to reference in your current namespace, e.g. by using dtml-with foo_namespacedtml-var "manage_delObjects(the_id)"/dtml-with. If you need more help, post the snippet you're working on again. seb. ___ 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] testing a product, then it disappears after restart
I am trying to create a zope product and it basically works in python, so I thought I would start trying to 'zopify' it. I created a directory in the zope Products directory called zIMAP and placed my code in there, along with a __init__.py file to initialise the product. Here is what it looks like, import zIMAP def initialize(context): """Initialize the zIMAP product.""" context.registerClass( zMAP.zimap,constructors = (zIMAP.manage_addzIMAPForm,zIMAP.manage_addzIMAP),icon = '') The main bit of my product code is in a file called zIMAP.py. When I restarted zope, my zIMAP product appeared in the product management list (broken, as I'd expected). I looked at the debug info that zope provides for broken products and made some changes to the code... followed by restarting zope. I then got a different error from the broken product info screen. However, when I made changes to the code and restarted zope this time, it was as ifI had done nothing. The same error was there (despite that particular line of code being different, and in fact at a different line). I could not make zope recognise my changes no matter how many times I restarted zope. So I tried deleting the product from the product management screen. It did indeed go away, but now it won't come back! When I delete any other working product, it simply reappears next time I restart zope. What has gone wrong with my product? How can I make zope recognise it again? I have included the top of my zIMAP.py file as well in case it is required. I'd really appreciate any help. tim top of zIMAP.py import imaplib, re, string, sys, os, DocumentTemplateimport Globalsfrom Globals import Persistent, Acquisitionimport AccessControlimport OFS class zimap (Acquisition.Implicit,Persistent,AccessControl.Role.RoleManager,OFS.SimpleItem.Item,): """zIMAP - Zope Product for displaying IMAP mailbox contents.""" index_html = DocumentTemplate.HTMLFile("zIMAP1.dtml")manage_addzIMAPForm = Globals.HTMLFile('add_zIMAP', globals()) meta_type = 'zIMAP (webmail)' def __init__(self, host):self.host = hostself.product_root = '.' class email: def connect(self, user, passw):self.user = userself.passw = passw self.M = imaplib.IMAP4(self.host)self.M.login(self.user, self.passw)self.user_dir = zimap.product_root+'/spool/'+self.useremail.makefiles(self) ...
Re: [Zope] dtml-in over the output from my method
- Original Message - From: Max M [EMAIL PROTECTED] To: Tim Hicks [EMAIL PROTECTED]; Zope@Zope. Org [EMAIL PROTECTED] Sent: Monday, November 06, 2000 9:48 PM Subject: RE: [Zope] dtml-in over the output from my method snip def list_messages(self): class msg: def __init__(self, msgnum, msgfrom, msgsub): self.msgnum = msgnum self.msgfrom = msgfrom self.msgsub = msgsub msgList = [] lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) # Oh no ... this wont cut it! #self.msgnum = num_from_sub[0] #self.msgfrom = 'This is from UNKNOWN' #self.msgsub = 'My special subject' #return self.msgnum, self.msgfrom, self.msgsub # Do it like this: msgList.append(msg(num_from_sub[0],'This is from UNKNOWN', 'My special subject')) return msgList Brilliant, it works a treat. Thanks very much. 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] ISPs that host zope
Greetings. I am a complete zope newbie but am enthralled by the technology. I am about to begin working on a personal web project and would like to build it in/with zope. Can anyone recommend a good ISP that will: -host and support zope -give me access to an RDBMS (MySQL or any other system would more than suffice) -give me a reasonable amount of space (50MB) -not break my budget ($30.00 per month.) Does such an animal exist? Please let me know what your experiences are with zope-friendly ISPs regardless of whether they meet my aforementioned criteria. Thank you so much. Keith R. Alperin Sr. Web Developer Ignite Sports Media [EMAIL PROTECTED] mailto:[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] Asked a million times already... Im sure
I know that many people have probobly already asked this, but how would I do the equivilant of a server side include? It seems obvious enough from examples that it is merely... dtml-var filename but I always end up with either blank content or '[]' sorry if you've answered this too many times Thanks Chris
Re: [Zope] images in directories
hi, Sure they are. If you ftp a jpg to the server it comes up with an id of bla.jpg, you can then refrence it in html just like you would on an Apache server or whaterver img src="../../bla.jpg" j. .. . Jason C. Leach ... University College of the Cariboo. .. On Mon, 6 Nov 2000, Chris Withers wrote: Pete Prodoehl wrote: Is it possible to have an image named "image.gif" or "image.jpg" ? (Are file extensions allowed? If so, how are those objects addresses?) dtml-with IMAGES dtml-var image.gif /dtml-with or dtml-var "IMAGES.getitem('image.gif',1)" cheers, Chris Pete -- "Farrell, Troy" wrote: dtml-with IMAGES dtml-var image1 /dtml-with This also works: dtml-var "IMAGES.image1" ___ 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] ZSybaseDA not working
Hi to everyone, especially the experts =) The reason for this email is an urgent need for a Sybase ASE database to work properly. Here's the deal. It worked like a charm on windows with ODBC.But now I moved to Linux, compiled ZSybaseDA and installed it. It works for selects and updates, etcetera, both in the test tab and in ZSQL methods. BUT when I try to call a stored procedure, well, lemme paste the traceback. A traceback is worth a million explanations: - traceback Zope Error Zope has encountered an error while publishing this resource. Error Type: Error Error Value: Error processing exec sp_gn_regionales '0990006792001' , null , NULL Stored procedure 'sp_gn_regionales' not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output). Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Cambiada el: 2000/10/30 16:03:22.4513 GMT-5 Website copyright grupo SUPÁN. Diseñado por Manuel Amador (Rudd-O), OpenCorp S.A. Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/local/zope/lib/python/OFS/DTMLDocument.py, line 177, in __call__ (Object: index_html) File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: index_html) File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 168, in __call__ (Object: form) File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: form) File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 168, in __call__ (Object: dw_gn_regionales) File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: dw_gn_regionales) File /usr/local/zope/lib/python/DocumentTemplate/DT_In.py, line 633, in renderwob (Object: sp_gn_regionales(cod_empresa=REQUEST.cod_empresa,cod_regional='')) File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: sp_gn_regionales(cod_empresa=REQUEST.cod_empresa,cod_regional='')) (Info: REQUEST) File string, line 0, in ? File /usr/local/zope/lib/python/Shared/DC/ZRDB/DA.py, line 453, in __call__ (Object: sp_gn_regionales) File /usr/local/zope/lib/python/Products/SybaseDAv2/db.py, line 299, in query File /usr/local/zope/lib/python/Products/SybaseDAv2/db.py, line 333, in _error Error: (see above) - end traceback -- I'm baffled. I just got too accustomed to Zope so that we committed to the development of reports on the Web instead of with PowerBuilder. If this doesn't work, I will have to sustain several hours of psychological punishment, and I will have to dump Zope in favor of a better solution. These kinds of things make Zope not suitable for enterprise applications, where you can't rely on poorly documented things like ZSybaseDA. I'm even angry at liking Zope now. For the record, I'm using Sybase ASE 11.9.2 with the latest OpenClient RPM from Sybase.com. As you can see, this is a ZSybaseDA problem since everything but the stored procedures return data or alter/update it. I need an answer soon. OR, at least a hint of where could I tap information sources to DigitalCreations directly for commercial support, regarding Sybase support for our needs. I read about the agreement between Sybase and Digital Creations. But I can't find any information regarding Zope support in either Digital Creations' or Sybase's web sites. And I have exactly one week. Any
[Zope] LDAP KeyError problem
Hi Everyone, We have a problem with the LDAP Adapter. I've searched the entire Zope Doc website and thru the mailing list archives and can't find any examples of anything that come remotely close. If we define an LDAP filter (called Academics) as thus: Base DN: o=Monash University, c=au and search filter as: ((ou=Department of Biological Sciences)(employeetype=Full-time)(employeetype=Academic Staff)) ..it gives me a perfect list of all my LDAP entries for all of my full-time academic staff. i can see all of the attributes perfectly when I click the Test tab. No problems there. However, when I try to use some of the entries in a dtml-in statement, half of the entries give me a KeyError. for eg. dtml-var standard_html_header h2dtml-var title_or_id/h2 p dtml-in Academics Surname: dtml-var snBR Given Name: dtml-var givennameBR Initials: dtml-var initialsBR Gender: dtml-var genderBR Phone: dtml-var phonenumberBRBR /dtml-in Academics /p dtml-var standard_html_footer If I try to view the above document, it gives me a KeyError on phonenumber. ie Zope Error Zope has encountered an error while publishing this resource. Error Type: KeyError Error Value: phonenumber snip Traceback (innermost last): File /usr/Zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/Zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/Zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/Zope/lib/python/OFS/DTMLDocument.py, line 177, in __call__ (Object: index_html) File /usr/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: index_html) File /usr/Zope/lib/python/DocumentTemplate/DT_In.py, line 691, in renderwob (Object: Academics) KeyError: (see above) If I remove that line, it works perfectly. the same thing happens on a number of other attributes including title, roomnumber, mail, facsimiletelephonenumber (all the ones I want/need really...). Can anybody give me any clues what I'm doing wrong here? Has anybody hit this problem before? We are using Zope 2.2.2, Python version: 1.5.2, and ZopeLDAP 1.0beta1 Any help greatly appreciated - Michael ~~~ Michael Blewett Computer Support Mgr - Biological Sciences Monash University (Clayton Campus) Victoria Australia 3168 "I'm out of my mind at the moment, but feel free to leave a message..." ___ 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] Asked a million times already... Im sure
From: Chris Trowbridge [mailto:[EMAIL PROTECTED]] I know that many people have probobly already asked this, but how would I do the equivilant of a server side include? It seems obvious enough from examples that it is merely... dtml-var filename but I always end up with either blank content or '[]' If you want to include it from a file on the computer and not an object in Zope then you should probably use the FileSystem product to make it visible to your file. If the file you want to include is in Zope allready the you should make shure that the incl_file is in your out_files' aquisition path. ie. directly beside you document or in a stright line between your document and the root. Or you should adress it directly. / folder1 incl_file output_dtml folder2 folder3 Here output_dtml can se and "include" incl_file / folder1 incl_file folder2 output_dtml folder3 Here it cannot. Except if you adress it like: dtml-var "folder1.incl_file" (Think of it as ../folder1/incl_file) Regards Max ___ 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 )