Re: [Zope-dev] Beginning Zope User
Hi John, John Gunnar Carlsson wrote: Help! I downloaded a product and uploaded it to my directory, but I don't know how to unzip it. I'm using NT. Whenever I load WinZip it will only let me unzip it to local places on the hard disk but nowhere on the Zope directory itself. ___ Zope-Dev maillist - [EMAIL PROTECTED] I'd really like to help you with this, but there's two reasons that I can't right now. 1: You've posted this message to the [EMAIL PROTECTED] mailing list. This list is for discussion about developing the innards of Zope and really technical stuff like that. The correct mailing list for your question is the more general [EMAIL PROTECTED] 2: I'm not sure what you're asking. When you ask again in [EMAIL PROTECTED], be sure to say all of the following: * Exactly which version of Zope you have installed * Where on your harddisk you have installed it * What the product is you have downloaded * Exactly the steps you have tried to follow to install the software * What documentation you are getting your steps from, and where you got that documentation from This might all sound like a lot, but it really is the minimum I'd need in order to be able to answer your question correctly. Also, if you ask on [EMAIL PROTECTED], others who might have a similar problem will benefit from any answer. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: missing docstring in getItem()
"Phillip J. Eby" wrote: Changes checked in. I should be releasing an alpha5 tomorrow. That's great. Did you get my message about errors in triggered methods? I realised that I only sent it to the zope-dev list, and not cc-ed to you. I had hoped to finish my work on proxy roles, ZClass plugins, Does that increase the number of "Waaa!" comments in the code? and maybe even my local-roles stuff first and make it a "beta" release, *If* you get time, can you put a note on the ZPatterns Wiki, or to the zope-dev mailing list briefly describing what proxy roles, and local roles mean in the context of ZPatterns? Thanks. (Of course, if any other ZPatterns gurus can answer that...) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] External Method Missery
Shane Hathaway wrote: Here's the logic: ExternalMethod sets up func_* attributes so it can masquerade as a function. The trick works well enough to convince ZPublisher's mapply() to pass in a "self" argument as the first argument when needed. What 'self' does mapply pass? I always though it would be the object being rendered (the one that would appear before PARENTS[0] in PARENTS if such a thing were possible ;-) but it appears to in fact be PARENTS[0]. ...which seems silly So, apparently I have to pass this() to my external method to find out what object I'm working on, which is a shame :( My code which prepares a list of object that are in the URL path (does this mean the objects that have been traveresed?) now looks like: def navTree(self,startlevel,this): # strip off acquisition wrappers, reverse the list... yum yum ;-) objects = map(lambda o : getattr(o, 'aq_base', o),self.REQUEST.PARENTS[:-startlevel]) objects.reverse() objects.append(getattr(this, 'aq_base', this)) ...which doesn't give quite what I want objects[-1] should be the object getting rendered, however, for folders getting rendered where index_html is a DTML document, it is the index_html document. I guess what I'm asking is, from PARENTS and this(), is there any way I can tell when I'm rendering folder/ as opposed to folder/index_html? If I can't, then how should I do this? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] External Method Missery
Steve Alexander wrote: Ah... but are you calling the external method from a DTML method? These are all methods, and therefore you'd expect the "self" object to be the object the methods are subobjects of. The exact turn of events is that index_html is a DTML method which shows a DTML _document_ with dtml-var doc_name The header, in which the navtree is rendered, is a DTML method that's called from the doc_name DTML document with another dtml-var navtree is a DTML method which calls the external method. So unravel all that, and you can decide for yourself ;-) See my reply to my own posting which poses another interesting question. It'd be nice to have some way of finding whether the object being rendered to the browser is the result of rendering a DTML method _on_ the object or just the object itself... cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: BTree folder w/ customizer support
Steve Alexander wrote: I want to combine Shane Hathaway's BTreeFolder product with ZPatterns to create a "BTree folder w/ Customizer support". snip! Instead, why not make PlugInContainer a mix-in class, and have concrete classes for PlugInFolder and PlugInBTreeFolder ? Then, it is easy to have a CustomizerFolder and a CustomizerBTreeFolder. Then again, I wouldn't mind if things stay as they are, except that PlugInContainer is made to derive from BTreeFolder rather than Folder. Of course, that creates a dependency that you need the BTreeFolder product in order to use ZPatterns. Or... I could alter Shane's BTree Folder product to split it into a mix-in class and a usable folder class. Would that work, I wonder? -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Uploading a ImageFile
Hi, i have a question on uploading an image from my Product. I have a Product in http://server:8080/somewhere/Product. In my Product i call: self._setObject(id, File(id,title,'',content_type, precondition)) self._getOb(id).manage_upload(file) Now the image is on http://server:8080/somewhere/Product/image right? But i want the following: The Product at http://server:8080/somewhere/Product at the uploaded Image should be stored at http://server:8080/anotherplace/images/ . Who could help to program this in my Product. mfg ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: BTree folder w/ customizer support
At 02:30 PM 7/13/00 +0100, Steve Alexander wrote: Steve Alexander wrote: I want to combine Shane Hathaway's BTreeFolder product with ZPatterns to create a "BTree folder w/ Customizer support". snip! Instead, why not make PlugInContainer a mix-in class, and have concrete classes for PlugInFolder and PlugInBTreeFolder ? Then, it is easy to have a CustomizerFolder and a CustomizerBTreeFolder. Then again, I wouldn't mind if things stay as they are, except that PlugInContainer is made to derive from BTreeFolder rather than Folder. Of course, that creates a dependency that you need the BTreeFolder product in order to use ZPatterns. Or... I could alter Shane's BTree Folder product to split it into a mix-in class and a usable folder class. Would that work, I wonder? Probably. I think the main problem you'll run into will be the UI, since the BTreeFolder is going to probably display all its contents without filtering out PlugIns. You may have to do some work on that. Other than that, though, my guess is that a BTreeFolder mixin would layer nicely over PlugInContainer. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: missing docstring in getItem()
At 08:50 AM 7/13/00 +0100, Steve Alexander wrote: "Phillip J. Eby" wrote: Changes checked in. I should be releasing an alpha5 tomorrow. That's great. Did you get my message about errors in triggered methods? Yes, I did, but the solution requires some more thought. I had thought I had the "Transactional" machinery set up so that stuff was only called during transaction phases where it was safe to throw errors. So I'm going to have to go back and review that. However, I also think that errors in triggers should result in a rollback-and-abort, rather than silently failing, which could cause many other problems. I realised that I only sent it to the zope-dev list, and not cc-ed to you. Not necessary; my reading rate simply varies. :) I had hoped to finish my work on proxy roles, ZClass plugins, Does that increase the number of "Waaa!" comments in the code? No, I hadn't even got that far yet. :) and maybe even my local-roles stuff first and make it a "beta" release, *If* you get time, can you put a note on the ZPatterns Wiki, or to the zope-dev mailing list briefly describing what proxy roles, and local roles mean in the context of ZPatterns? Thanks. The proxy roles stuff is for Generic providers and triggers, so that when they execute your expressions they can have roles other than those of the current user, which is important for constructing secure applications. The local roles stuff is the ability to have a DataSkin get local role information from "local role providers", thus allowing rules-based local roles to exist/co-exist with the standard Zope persistently-managed local roles. One aspect that will be considered in the local roles work is adjusting the LoginUser class so that it can use more efficient ways of checking access to an object if it's a DataSkin. The built-in Zope approach has to look for *all* local roles that a user has, even when it only wants to know about one of them. In general I'd like to see Zope's local role API's tightened up in this fashion. Another tightening would be to use the user object rather than the user's ID or name when calling local-roles API's, since a rule-based approach may need to consult data on the user object. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: BTree folder w/ customizer support
Steve Alexander wrote: Or... I could alter Shane's BTree Folder product to split it into a mix-in class and a usable folder class. Would that work, I wonder? I just tried it and discovered some subtle problems with __getattr__. It could be the result of TransparentFolders, which is also running on my system. The released versions of BTreeFolder and TransparentFolders work together, but not when I decomposed BTreeFolder into base classes. YMMV! Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: missing docstring in getItem()
"Phillip J. Eby" wrote: That's great. Did you get my message about errors in triggered methods? Yes, I did, but the solution requires some more thought. I had thought I had the "Transactional" machinery set up so that stuff was only called during transaction phases where it was safe to throw errors. So I'm going to have to go back and review that. However, I also think that errors in triggers should result in a rollback-and-abort, rather than silently failing, which could cause many other problems. Right. So the application designer has the choice of whether to put their methods that are called by GenericTriggers in try-except blocks, if it doesn't matter if the trigger fails. But it is generally assumed that triggers need to run without exceptions for the application to work consistently. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] zpatterns-0.4: default attributes, more
hello, ignore my precedent post. too much caffeine, not enough sleep my problem is solved if I use the class_default_for_X trick... regards, [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zpatterns-0.4: defaults attributes, more...
At 07:11 PM 7/13/00 +0400, Ava wrote: first generic attribute provider: fromexpr = '(self.id[0] and sql_get_first(key=id[0]) or [NOT_FOUND])[0]' attrsexprs = ['first_data=RESULT.data'] second generic attribute provider: fromexpr = 'self.id[1] and sql_get_first(key=id[1]) or [NOT_FOUND])[1]' attrsexprs = ['second_data=RESULT.data'] third generic attribute provider: fromexpr = '' attrsexprs = [ 'which_one=self.id[1] and 1 or 0', 'data=[self.first_data, self.second_data][self.which_one]' ] however, this does not work, because if which_one is 0, self.first_data is ok but self.second_data is taken from NOT_FOUND. An error is raised and all the attribute served by the third generic attribute provider are ignored. any ideas to solve that problem??? thanks for any input. Try: data=(self.which_one and [self.second_data] or [first_data])[0] Then only the correct one will be referenced. Offhand, I'd guess that there is probably a lot easier way to do what you're doing, and that you probably don't even need/want "id" to be a sequence, let alone some of the other things you're doing here. But without knowing what your app is actually trying to do, I can't suggest anything further. ___ 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] ZPatterns alpha 5 released
Here's the details from the CHANGES file: New Features/Bug Fixes in 0.4.0alpha5 - Property Sheets for DataSkin-based ZClasses. Now you can put define property sheets on a ZClass and still use AttributeProviders for the properties. Just add a "DataSkin Property Sheet" to your ZClass instead of a "Common Instance Property Sheet". (Note: you can only do this with *new* DataSkin-derived ZClasses. If you have an already existing ZClass, you must either re-create it by hand or do the "setbasesholdontoyourbutts" hack to re-create the ZClass.) - GenericTriggers now also pass a variable "ORIGINAL" which is a dictionary of the original values of changed attributes (or NOT_FOUND if the attribute did not exist before changing). Note that if the values are complex or mutable, they cannot be guaranteed to be truly the same as their starting state, so this should really only be used for simple atomic values like strings and numbers. - Numerous bug fixes, including: - Specialists were always returning the result from the first Rack - setuid support for LoginManager was broken, and also didn't deal with executable-owner masking - _DelAttributeFor() was broken for persistently-stored attributes - Deleting a non-existent attribute no longer flags the attribute as changed - _constructPlugIn() was broken with latest 2.2 version that binds constructors to their products/factories - In the latest Zope, setting ownership after adding was causing a Changed event to fire instead of an Added event. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zpatterns-0.4: defaults attributes, more...
"Phillip J. Eby" a écrit : Try: data=(self.which_one and [self.second_data] or [self.first_data])[0] wow. what a *clever* idea to use [] around self.???_data. I used to write: data=self.which_one and self.second_data or self.first_data but this failed because sometimes self.second_data is a "false" value (eg 0, '', instead of None that I use for empty values), causing self.first_data to be returned instead. one learns about python every day. thanks for the tip. As I wrote in an earlier post, my initial problem was solved using class_defaut_for_X trick Offhand, I'd guess that there is probably a lot easier way to do what you're doing, and that you probably don't even need/want "id" to be a sequence, let alone some of the other things you're doing here. But without knowing what your app is actually trying to do, I can't suggest anything further. I'm writing an application to track issues. I can not just use DC's tracker product, because my customer's needs are very specials. Well, various entities in my application have a so called 'location'. I wish to be able to re-use the application I'm writing, so I abstracted the concept of 'location'. i have then a specialist to manage locations got from a location rack. The rack I wrote for my customer deals with two-headed locations: (site, subdivision). Each part of the location is managed in a different way, but I need the two to identify one's location. Later, when I install that program for a different customer, I want to be able to rip out the old location rack and put another location rack which can be more 'normal' (ie, one-headed) No one will notice except the key to get the location is now an integer (or a string) instead of a tuple. So, I think I'm doing right to have an id which is a sequence. Thanks for your great help. I'm still fighting to acquire the principle behind zpatterns, but once I get it, I wish I could help others to understand it as well. regards, [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zpatterns: how to specify default values?
"Phillip J. Eby" a écrit : Yes. Name the attributes "class_default_for_X" where X is the attribute name. Thanks very much. This works with the currently release ZPatterns, but alpha5 will go one better and let you create ZClass property sheets that transparently implement this. That is, if you add a "DataSkin Property Sheet" to your ZClass instead of the standard "Common Instance Property Sheet", that sheet's attributes will be translated to/from the "class_default_for_X" names on the ZClass. I don't use ZClass as I wrote only in Python. I really have to understand how do propery sheets work. What I don't understand is where the properties are stored. This is not clear when I read the PropertyManager source. I guess property sheets are for grouping some related attributes, but the actual work of storing/retrieving the attribute is done by the attribute providers, right? If so, so be it :-) By the way, - is the python programmer have to mix PropertyManager in with DataSkin to use property sheets? I guess so, but what, I seem to be the only one who use zpatterns directly from python. All the ZClass junkies out there do have all the mixin classes ready even before they start :-) - I sometimes have a dataskin that is willing to get something from its context. What is the preferred way to do this: try to acquire the attribute from self._v_rack, wich is guaranteed to be wrapped in the specialist's context, or just mix Acquisition.Implicit in with DataSkin? regards, [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZEO and MountedStorage: Access DENIED!
Pardon the lawnmower man reference, but ZEO and MountedStorage do _not_ work together. I just tried, so this is just an initial report. What happens, is htat the local ZEO Client wil try to mount the additional .fs-es on the local system, which will fail. FYI, Bill -- Bill Anderson (ARC)Unix/Linux System Administrator HPSO Engineering Productivity Team Thursday, July 13, 2000 Random Quote: A bug in the hand is better than one as yet undetected. ___ 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] ZEO and MountedStorage: Access DENIED!
Bill Anderson wrote: Pardon the lawnmower man reference, but ZEO and MountedStorage do _not_ work together. I just tried, so this is just an initial report. What happens, is htat the local ZEO Client wil try to mount the additional .fs-es on the local system, which will fail. OK, I know I am replying to myself I have been thinking, and I think I have got a good idea. So I figured I woudl toss it out for commentary. What we need now is a Mountable ZSS Product. This would be kind of a MountedStorage meets ZEO breed, where you would specify the ZSS host/port combo, and it could act like a mounted FileStorage, except it would talk to a ZSS. Whaddya think? Any educated guesses as to the difficulty? Bill -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] ZEO and MountedStorage: Access DENIED!
Bill Anderson wrote: I have been thinking, and I think I have got a good idea. So I figured I woudl toss it out for commentary. What we need now is a Mountable ZSS Product. This would be kind of a MountedStorage meets ZEO breed, where you would specify the ZSS host/port combo, and it could act like a mounted FileStorage, except it would talk to a ZSS. Whaddya think? Any educated guesses as to the difficulty? It would be a simple, intermediate-level project. MountPoint is a base class. You're supposed to provide the implementation of just one method. That method is supposed to return a DB object. So your product would be just like Anthony's, except it would accept host and port parameters and return a DB derived from a ClientStorage object. Shane ___ 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] is there a way to pass namespace in to the page which is within a page?
is there a way to pass namespace in to the page which is within a page? for example : how can I make this work??? 3 files the top one is the one that is suppose to be displayed currently the main dtml file has the following line dtml-var SomeVar !-- there is a valid namespace SomeVar and this line prints it out... -- !-- the next line works fine with Number 5, but not if I substitute SomeVar instead of 5 -- dtml-var "Some_Header(style=Some_Style_css(SomeKey=5))" - the Some_header dtml file has the following lines- style --! dtml-var style --! /stile - the Some_Style_css dtml file has the following lines-- input{ position: relative; font-size: dtml-var SomeKey } -- Now the whole thing works great.. however, if I attempt to make NUMBER 5 by any variable from REQUEST or the current form the KeyError comes up : if instead of 5 I put SomeVar (which was passed to this dtml from some other form) I get "Error Type: KeyError Error Value: SomeVar" ___ 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] 2.1.6 and ZSQL methods
Like an idiot I blythly ignored all the emails flying back and forth concerning the problems with 2.1.6 and ZSQL methods because I was not using 2.1.6 and didn't plan on upgrading my 2.1.4 until the 2.2 was stable. Hah!!! Was the issue ever resolved? I really need for my 2.1.4 ZSQL methods to work in 2.1.6. Does anyone know of a patch or other workarounds? mea culpa. Jim ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] hard dtml syntax problem
On Wed, 12 Jul 2000, ethan mindlace fremen wrote: Jerome Alet wrote: Hi want to call ZopeFind to find all folders in the current folder which doesn't have got any subfolder. the following query works but returns all folders, even those which have got subfolders: dtml-let myresult="ZopeFind(this(), obj_metatypes=['Folder'], search_sub=1)" dtml-in myresult ... /dtml-in Couldn't you just do a nested dtml-in? It's kind of hacky, but... dtml-in "objectValues(['Folder']" dtml-in "objectValues(['Folder']" No this can't help because I don't know how deep is my hierarchy: I've delegated folder creations to at least ten persons. I'm sure I can do it with ZopeFind, because Zope do it in the Find (Advanced) tab, but don't know the exact syntax of: """ obj_expr = "not objectValues(['Folder'])" """ (which doesn't work because of nested " and ') Actually I've put a dtml-if inside of my dtml-in loop, but it limits my possibilities, especially because my result length is overestimated (all folders vs only folders with no subfolders). thanks anyway for your answer. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] how to check if the ResultSet is null?
You could always do something like this first: "select Count(usr_email) from info(table name) where usr_email = dtml-sqlvar usr_email type=string" Then check the result will be either 1 or 0. Cheers Peter -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of SaSent: Thursday, 13 July 2000 6:04 AMTo: [EMAIL PROTECTED]Subject: [Zope] how to check if the ResultSet is null? Hi, I stuck on a problem: I am creating a registration form. I need to check if the person info has already in database. I created a Z SQL method which I used "select usr_email from info(table name) where usr_email = dtml-sqlvar usr_email type=string" I want to call this method from my dtml method and see if it returns "null". But I'm not sure how to implement this. In Java, it has ResultSet which I can check if it returns null. I'm not sure how to accomplish this in Zope. I could not find relevant document. If you know this, could you give me a hand? Thanks! Sa
Re: [Zope] hard dtml syntax problem
Jerome Alet wrote: On Wed, 12 Jul 2000, ethan mindlace fremen wrote: Jerome Alet wrote: Hi want to call ZopeFind to find all folders in the current folder which doesn't have got any subfolder. the following query works but returns all folders, even those which have got subfolders: dtml-let myresult="ZopeFind(this(), obj_metatypes=['Folder'], search_sub=1)" dtml-in myresult ... /dtml-in Couldn't you just do a nested dtml-in? It's kind of hacky, but... dtml-in "objectValues(['Folder']" dtml-in "objectValues(['Folder']" No this can't help because I don't know how deep is my hierarchy: I've delegated folder creations to at least ten persons. I'm confused. You said you only were concerned about the _current_ directory's subdirectories not having sub-directories, right? IOW You have: ROOT FolderA -FolderA1 -FolderA2 /FolderA2A FolderB FolderC And in ROOT, you only want to see : FolderB FolderC And in FolderA: FolderA1 Right? If so, whether or not FolderA1 has subfolders is irrelevent in root. The code ethan posted will provide you with that. I have very similiar code for one of my nav-systems, opnly it is the opposite, I show folders (and various other objects) and their subfolders (and various other objects) only. I'm sure I can do it with ZopeFind, because Zope do it in the Find (Advanced) tab, but don't know the exact syntax of: """ obj_expr = "not objectValues(['Folder'])" """ (which doesn't work because of nested " and ') Actually I've put a dtml-if inside of my dtml-in loop, but it limits my possibilities, especially because my result length is overestimated (all folders vs only folders with no subfolders). Maybe I read it wrong, but I thought you said you wanted only folders with subfolders _in the current directory_. Maybe you need to rephrase your question? Bill -- "Linux: the operating system with a CLUE... Command Line User Environment". seen in a posting on comp.software.testing ___ 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] Antwort: RE: [Zope] LoadSite can create a corrupted data.fs ?
Hi Jonathan, Jonathan Desp, 12.07.2000 23:27:03 Hi, How I can make a regular backup ? How I can restore it ? I cannot log in. it's 100% corrupted. Uhm. As far as I practice, I make backups of the filesystem on a regular basis. If you replace the Data.fs with an older version without the corruption, it does work. Thats why backups are usually made ;) Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] I want to assign the values of parameters in a form to another parameter in the same form?
Sean G Richards wrote: Dear Zope list, I want to cat the values of parameters, all strings, in a form to another parameter in the same form. How would I go about doing this using dtml? I tested using this: dtml-call "REQUEST.set('foo','this is a string')" dtml-call "REQUEST.set('bar','so is this')" dtml-call "REQUEST.set('foobar',foo+bar)" and it worked, so I guess you could just use dtml-call "REQUEST.set('all_params', param1+param2+etc... Is that what you wanted? --Aaron ___ 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] hard dtml syntax problem
On Thu, 13 Jul 2000, Bill Anderson wrote: Jerome Alet wrote: Hi want to call ZopeFind to find all folders in the current folder which doesn't have got any subfolder. Sorry, I should have added : recursively !!! I'm confused. You said you only were concerned about the _current_ directory's subdirectories not having sub-directories, right? IOW You have: ROOT FolderA -FolderA1 -FolderA2 /FolderA2A FolderB FolderC And in ROOT, you only want to see : FolderB FolderC And in FolderA: FolderA1 Right? No, what I want is the following list (with your example): ['FolderA1', 'FolderA2A', 'FolderB', 'FolderC'] I'm sure I can do it with ZopeFind, because Zope do it in the Find (Advanced) tab, but don't know the exact syntax of: """ obj_expr = "not objectValues(['Folder'])" """ (which doesn't work because of nested " and ') Actually I've put a dtml-if inside of my dtml-in loop, but it limits my possibilities, especially because my result length is overestimated (all folders vs only folders with no subfolders). Maybe I read it wrong, but I thought you said you wanted only folders with subfolders _in the current directory_. Maybe you need to rephrase your question? Yes I'm sorry: From a Folder, I want to recursively search for all "terminal" folders (leaves) and build a list of these folders. bye "terminal" folder, I mean a folder with no subfolder. The following should give me exactly the result I want, if only I knew how to write it in a way accepted by the dtml parser: dtml-let myresult="ZopeFind(this(), obj_metatypes=['Folder'], search_sub=1, obj_expr=""" not objectValues(['Folder']) """ )" ... /dtml-let My actual solution is to do : dtml-let myresult="ZopeFind(this(), obj_metatypes=['Folder'], search_sub=1)" dtml-if "not objectValues(['Folder'])" ... /dtml-if /dtml-let but this solution is not good because if I need len(myresult) it returns me the total number of folders, not the number of "terminal" folders, and I find it stupid to have to build a new list in a dtml-in and then loop over the new list in a second dtml-in because I know ZopeFind is the solution: can do it, I've tested it with the Find tab. My only problem is: What is that f... syntax ? Any DTML Syntax guru out there ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to check if the ResultSet is null?
You could always do something like this first: "select Count(usr_email) from info(table name) where usr_email = dtml-sqlvar usr_email type=string" Then check the result will be either 1 or 0. That's asking for trouble 'cos Zope ain't gonna like an id such as 'Count(usr_email)', it's a great idea though :-) Here's how you might need to rephrase it to make Zope happy: "select Count(usr_email) as usremail from info(table name) where usr_email = dtml-sqlvar usr_email type=string" 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 )
Re: [Zope] simple instructions for site search
ethan mindlace fremen wrote: You want the ZCatalog Howto: http://www.zope.org/Documentation/How-To/ZCatalogTutorial Do catalogs search otehr catalogs they find? Only asking 'cos I don't think that'll help him search his whole site as the Squishdot postings won't get searched. But, if the above is true, then it should be okay since Squishdot is now subclassed from ZCatalog :-) cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Variable sort in dtml-in
In my search form, I have a selection box "in_sort_by" whose value can be "Category", "Field", or "Title". I am trying to make dtml-in sort by this value. I am using: dtml-in SQL_search sort="_['in_sort_by']" size=list_size start=query_start And I've tried other variations, but I always get an attribute error. The strange thing to me is that list_size is also a variable and it works fine, but I've tried just using in_sort_by and that doesn't work. What am I missing here? Many thanks, Aaron ___ 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-adding content by form
Hallo, I'd like a user to add content with a form. The website is made with a framest and content should be added and also the navigation should be updated! I think that's a smaller problem but I didn't find an explanation. I'm very happy about every hint! -- Sent through GMX FreeMail - http://www.gmx.net ___ 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] Acquisition problems?
Curtis Maloney wrote: [snip] Well, here's the details: / standard_html_header register /internal/ standard_html_header register works fine if invoked as /register however, it spits the dummy if invoked as /internal/register Complaining loudly about TypeError: too many arguments; expected 2, got 3 in standard_html_header. Is register a method, or a document? If it is a method the when you call /internal/register you are calling the object internal with the method register, so when it looks for standard_html_header it will first look in internal, before doing the acquisition thing. So it finds internal/standard_html_header. If it is a document, then you are calling the object /register, in the context of internal, but the containment of / so you get /standard_html_header. In algebra terms, if register is a method, you have (internal o /) but if register is a document (or folder, or other object) you have ((register o /) o (internal o /)) This is how acquisition (simple acquisition) behaves. Of course, I am strongly of the opinion that this method of acquisition is of very limited use and zope should really use natural acquisition (see http://www.zope.org/Wikis/zope-dev/AcquisitionUsage for a definition). The problem with acquisition as it currently is is that you can't use the example you have above to do something useful. You can't have a default site which you can then flavour, or skin, by adding an overriding object high up in the context tree. Example: /register is the standard way of presenting the register page. But, for internal use, you want it to look different, so you create /internal, which replaces some of the methods (like standard_html_header). You should then be able to call /internal/register and see register in the _context_ of internal, which is what is important. The containment of an object is only useful from an administrative point of view. The thing which is important is the _context_ in which the object is called. As it is, in order to achieve the result described above you have to carefully construct your site in order to work around the problems with acquisition, which really isn't the way we should be doing things. Sorry to go on about this, but as time passes I am becomming more and more convinced that the method of acquisition needs to change from containment before context to context before containment. I have yet to think of any advantages provided by the current method, but I would be more than happy to hear of any. For reference, here a more general post on the problem I sent to the list a while ago: http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/61727C8A78322A51 and here is a summary of the problem in the dev wiki: http://www.zope.org/Wikis/zope-dev/AcquisitionFeedback Cheers, Stephen -- Stephen Harrison[EMAIL PROTECTED] New Information Paradigms www.nipltd.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] simple instructions for site search
chris, catalogs don't automatically search other catalogs they find. until this is implemented you could create a separate catalog that only catalogs other catalog instances (and your squishdot instance) and then you could ask that main catalog to give you all its other catalogs and simply fire off the search you want to do on each of them. if your site is very simple and the location/number of catalogs doesn't really change you could also hard-code them into a search page that asks all of them directly. jens -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Withers Sent: Thursday, July 13, 2000 04:49 To: Ethan Fremen Cc: Sean Kelley; [EMAIL PROTECTED] Subject: Re: [Zope] simple instructions for site search ethan mindlace fremen wrote: You want the ZCatalog Howto: http://www.zope.org/Documentation/How-To/ZCatalogTutorial Do catalogs search otehr catalogs they find? Only asking 'cos I don't think that'll help him search his whole site as the Squishdot postings won't get searched. But, if the above is true, then it should be okay since Squishdot is now subclassed from ZCatalog :-) 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 check if the ResultSet is null?
Hi, Hi, I stuck on a problem: I am creating a registration form. I need to check if the person info has already in database. I created a Z SQL method which I used "select usr_email from info(table name) where usr_email = dtml-sqlvar usr_email type=string" I want to call this method from my dtml method and see if it returns "null". But I'm not sure how to implement this. In Java, it has ResultSet which I can let's say, you called your ZSQL-method "getThisAddress" then you can do something like this: dtml-if getThisAddress You are already in the database /dtml-if Robert -- Robert Wohlfahrt ([EMAIL PROTECTED]) Tel: 0179 / 2980074 Fax: 0351 / 2880145 ___ 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] update Zope
I want to update from Zope 2.1.6 to 2.2.0. Is there a way to copy my contents to the new version or do I have to start from the beginning ? Thanks Mario ___ 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] SyabaseDa SP problem
I have the following problem. I run Zope under RH6.2 with Apache and SyBase through SyBaseDA. I have gorren the connection to work so that I can make simple SQL questions. The problem I have arise when I try to run an SQL StoreProcedure that lies in SyBase. At first it didn't wokr att all but after I changed the connection to not supporting transaction it worked better. But not good. I can call upon this SP one time. (the test SP I use does an simple insert(it works)). But I get the error message -- Error, Products.SybaseDAv2.db.Error: Unexpected result type Then the server waits for an answer to it's query. If I now try to use ANY sql methods i get the answer that the server is waiting for an answer and that I can't execute any more SQL's during that time. What can I do to eliminate this problem. Any help is welcome /Mathias Bengtsson ___ 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] Collector Product?
DC folks, Any plans of making the Collector (bugs/requests etc) as a downloadable product? ~ V.Satheesh Babu [EMAIL PROTECTED] . . http://vsbabu.csoft.net/ /V\ - Duct tape is like the force. It has // \\ a light side, and a dark side, and /( )\ it holds the universe together ... ^'~'^ ___ 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] Collector Product?
You check out the Tracker, the replacement for the Collector, rom the CVS... cheers, Chris Satheesh Babu wrote: DC folks, Any plans of making the Collector (bugs/requests etc) as a downloadable product? ~ V.Satheesh Babu [EMAIL PROTECTED] . . http://vsbabu.csoft.net/ /V\ - Duct tape is like the force. It has // \\ a light side, and a dark side, and /( )\ it holds the universe together ... ^'~'^ ___ 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] WorldPilot 1.1.0alpha Release Start + Palm PDA Sync
Hi WorldPilot Users, We just wanted to make a short notice, that we are starting to release alpha Snapshots of WorldPilot.1.1.0. It has various new enhancements, like email composer Address Book lookup, File Archive and others. The newest enhancement is Palm PDA Sync for Linux :-) This version comes along with the WorldPilot Intenet Pocket Sync conduit for Palm(TM) compatible PDAs. It enables you to sync WorldPilot over the net by using a Linux computer. The Current Version supports the Linux and simular plattforms. http://www.worldpilot.org We'll be moving the future WorldPilot Development over to Source Forge in the following weeks, too. Have fun. Cheers, Ryan -- Ryan Hughes [EMAIL PROTECTED] Neuberger Hughes GmbH http://www.n-h.net ___ WorldPilot - Get Synced - http://www.worldpilot.org The Open Source Personal Information Manager Server Powered by Python and Zope - http://www.zope.org ___ 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] 2.1.6 and ZSQL methods
My understanding was that DC decided not to fix it, but instead concentrate on the 2.2 series. There are some patches floating around in the archives, but none of them worked 100% for me. I just gave up and am running 2.2b4. The 2.2 betas has been plenty stable for me. Even with the few problems with the ealy betas, it has always run without blowing up. I *think*, depending on the authentication circumstances and location of the ZSQL methods, you might be able to rename the arguments that they use such that there is no conflict from acquisition (e.g., rename 'id' to 'myid' or whatever). That is, make sure the arguments are unique names. That turned out to be a big pain, but it worked. I had other problems with authentication that I could never find a workaround. That's why I just went to 2.2. Good luck. ;-) ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of The Sanfords Sent: Thursday, July 13, 2000 2:38 AM To: [EMAIL PROTECTED] Subject: [Zope] 2.1.6 and ZSQL methods Like an idiot I blythly ignored all the emails flying back and forth concerning the problems with 2.1.6 and ZSQL methods because I was not using 2.1.6 and didn't plan on upgrading my 2.1.4 until the 2.2 was stable. Hah!!! Was the issue ever resolved? I really need for my 2.1.4 ZSQL methods to work in 2.1.6. Does anyone know of a patch or other workarounds? ___ 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] Linux user group
Greetings, I am a member of the a Linux users group and I have been asked to do a demo on ZOPE because I am using it and many members are curious. I consider myself a ZOPE newbie, because use I use ZOPE to access some really simple databases. I have NOT done any special python programming (but not for lack of trying) but would like some input on what I should say about ZOPE. 1) Is there a ZOPE demo for that runs on a CDROM? 2) What is the best way to present ZOPE? Any help would be apprechiated. Thanks ___ 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 check if the ResultSet is null?
Sa wrote: Hi, I stuck on a problem: I am creating a registration form. I need to check if the person info has already in database. I created a Z SQL method which I used "select usr_email from info(table name) where usr_email = dtml-sqlvar usr_email type=string" I want to call this method from my dtml method and see if it returns "null". But I'm not sure how to implement this. In Java, it has ResultSet which I can check if it returns null. I'm not sure how to accomplish this in Zope. I could not find relevant document. If you know this, could you give me a hand? Thanks! If your ZSQL Method is named MyMethod: dtml-in MyMethod You've got some data dtml-else Nothing returned from the SQL /dtml-in Hope that helps . . . -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] space in variable returned by queries
Vanfleteren Francois wrote: Hello, I'm working with Zope and PostgreSQL When i do a query, Zope returns me a variable with a space at the end Do you know how i can do not to have this space at the end? dtml-var "_.strip(var_with_space_at_the_end)" should do. Or dtml-call "REQUEST.set('var_without_space_at_the_end',_.strip(var_with_space))" HTH Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Linux user group
Darn. I had slides for a LUG presentation up on one of my former company's servers, but they seem to have taken the box down. I don't have it archived anywhere. Maybe somebody made a copy? It was from... errr... maybe November last year? CURTIS David wrote: Greetings, I am a member of the a Linux users group and I have been asked to do a demo on ZOPE because I am using it and many members are curious. I consider myself a ZOPE newbie, because use I use ZOPE to access some really simple databases. I have NOT done any special python programming (but not for lack of trying) but would like some input on what I should say about ZOPE. 1) Is there a ZOPE demo for that runs on a CDROM? 2) What is the best way to present ZOPE? Any help would be apprechiated. Thanks ___ 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] Weird problem with Z MySQL Connection
Hi all, Keep getting an 'invalid connection string' error when trying to make a database connection from Zope. Weird thing is that I first moved a working build to another machine, which resulted in it not working anymore. Did a clean install of Zope 2.1.6 (Source), MySQL 3.22.32 and all necessary Zope products (ZMySQLDA 1.2.0) using the same packages used in the working install. Still no dice. Same setup :( Look: File /usr/share/zope/lib/python/Products/ZMySQLDA/db.py, line 155, in __init__ BadRequest: (see above) Why is Zope looking for files in '/usr/share' all of a sudden? It didn't in the first install. I haved searched the mailinglist archives already, tried stuff suggested there with similar problems. Still no dice :( Any ideas? Thnx Jonathan -- Traceback (innermost last): File /2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /2ndhome/devel/proj/euhf/zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: addConnection) File /2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: addConnection) File /2ndhome/devel/proj/euhf/zope/lib/python/Products/ZMySQLDA/DA.py, line 124, in addConnection (Object: ElementWithAttributes) File /2ndhome/devel/proj/euhf/zope/lib/python/Shared/DC/ZRDB/Connection.py, line 129, in __init__ (Object: RoleManager) File /2ndhome/devel/proj/euhf/zope/lib/python/Shared/DC/ZRDB/Connection.py, line 158, in edit (Object: RoleManager) File /2ndhome/devel/proj/euhf/zope/lib/python/Shared/DC/ZRDB/Connection.py, line 227, in connect (Object: RoleManager) File /usr/share/zope/lib/python/Products/ZMySQLDA/db.py, line 155, in __init__ BadRequest: (see above) ___ 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] Linux user group
you can create this yourself: http://www.zope.org/Members/jens/docs/zope_on_cdrom jens on 7/13/00 10:29, CURTIS David at [EMAIL PROTECTED] wrote: 1) Is there a ZOPE demo for that runs on a CDROM? ___ 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] 503 Zope temporarily overloaded
I was looking at stats today and saw this 503: Temporarily overloaded Can anyone guess at what this might mean? Thanks ___ 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] uncatalog of absent id?
Hello, Im fairly new to the Zope world. Im trying to delete a PTK folder, and get this error: Zope Error Zope has encountered an error while publishing this resource. Error Type: ValueError Error Value: Uncatalog of absent id '/icds/Members/bob/index_html' 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/zope/2.1.7/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/zope/2.1.7/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/zope/2.1.7/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /usr/local/zope/2.1.7/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/zope/2.1.7/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_delObjects) File /usr/local/zope/2.1.7/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_delObjects) File /usr/local/zope/2.1.7/lib/python/OFS/ObjectManager.py, line 401, in manage_delObjects (Object: ApplicationDefaultPermissions) File /usr/local/zope/2.1.7/lib/python/OFS/ObjectManager.py, line 273, in _delObject (Object: ApplicationDefaultPermissions) File /usr/local/zope/2.1.7/lib/python/OFS/ObjectManager.py, line 268, in manage_beforeDelete (Object: DemoPortalBase) File /usr/local/zope/2.1.7/lib/python/OFS/ObjectManager.py, line 268, in manage_beforeDelete (Object: ElementWithAttributes) File /usr/local/zope/2.1.7/lib/python/OFS/ObjectManager.py, line 268, in manage_beforeDelete (Object: ElementWithAttributes) File /usr/local/zope/2.1.7/lib/python/Products/PTKBase/PortalContent.py, line 226, in manage_beforeDelete (Object: index_html) File /usr/local/zope/2.1.7/lib/python/Products/PTKBase/PortalContent.py, line 213, in unindex_object (Object: index_html) File /usr/local/zope/2.1.7/lib/python/Products/ZCatalog/ZCatalog.py, line 358, in uncatalog_object (Object: ElementWithAttributes) File /usr/local/zope/2.1.7/lib/python/Products/ZCatalog/Catalog.py, line 373, in uncatalogObject ValueError: (see above) Any suggestions would be appreciated. Thankyou. nitesh. ___ 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] Workaround for objectValues security problem?
Hi, I'm trying to create a navigation bar DTML Method that goes something like this: dtml-let root="PARENTS[-1]" dtml-in "root.objectValues('Folder')" . . . The problem, as reported in a posting from Jerome Alet last week, is that the Anonymous user does not have permission to access the objectValues method. Giving the navigation bar DTML Method the proxy role of manager does not work correctly: the method can be called directly but not within other documents or methods. Does someone have a workaround for this problem? Thank you. ___ 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] For Newbies Only!
Ok folks if you are like me and not only can't see the light but can't even find the path to the light try these things: 1. Do the Python tutorial. 2. Read every message from the list archives for the past two months. 3. Even if you don't want to develop on a beta platform. Install 2.2b4 on another machine and go through the tutorial. Then read the API docs. Took me more or less two days. Time VERY well spent. Now go back to your application and yea shall see the path that will lead you from darkness. Just my two-cents on how I found the path... -- Tim -- Opportunity is missed by most people because it is dressed in overalls and looks like work. Thomas Edison ___ 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] BTreeFolder
Hi, I want to try out the BTreeFolder product. I unpacked it an restarted Zope, but int the Products-management screen it shows up as a broken product. I use Zope-2.1.4 ... Below is the Traceback it gives me on a click: - BTreeFolder Import Traceback Traceback (innermost last): File "/usr/local/Zope-2.1.4-src/lib/python/OFS/Application.py", line 387, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope/lib/python/Products/BTreeFolder/__init__.py", line 89, in ? import BTreeFolder File "/usr/local/Zope/lib/python/Products/BTreeFolder/BTreeFolder.py", line 89, in ? from AccessControl import getSecurityManager ImportError: cannot import name getSecurityManager - any ideas? Robert -- Robert Wohlfahrt ([EMAIL PROTECTED]) Tel: 0179 / 2980074 Fax: 0351 / 2880145 ___ 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] Class Refactoring Question
I've developed a couple of simply Python classes which I'm using as base classes for some ZClasses that I've developed. I now realize that both of these Python classes could benefit from obtaining behavior from another class. Will I complete hose myself if I change the class definition of my Python base classes? In other words, will existing ZClass instances be completely screwed up if I do this? For example, suppose that I have a base class written in Python which looks like this: class MyFolder(OFS.Folder.Folder): ... I have a ZClass which uses MyFolder as a base, and I have one or more instances of my ZClass in my ZODB. I would like to change the definition of MyFolder to be something like this: class MyFolder(OFS.Folder.Folder, SomeOtherClass): ... Can I do this, or am I asking for trouble. Thanks. James W. Howe mailto:[EMAIL PROTECTED] Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103 ___ 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] BTreeFolder
Robert Wohlfahrt wrote: Hi, I want to try out the BTreeFolder product. I unpacked it an restarted Zope, but int the Products-management screen it shows up as a broken product. I use Zope-2.1.4 ... any ideas? Been there, done that s. It requires 2.2+. But boy am I looking forward to using it as soon as 2.2 is out of beta. VBG. -- Tim -- Opportunity is missed by most people because it is dressed in overalls and looks like work. Thomas Edison ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ANN: Zope Treasures - ZClass/Product Search Engine (fwd)
hello all, beehive is pleased to announce the release of: http://www.zope-treasures.com search by keyword or category for DTML Code, Products, External Methods and Zope Products. additionally you can: - rate - comment - add and view additional documentation links - submit your own treasures - see what's been added to Zope Treasures in the last week (Just off the Boat) - see which products got the highest ratings (Best of the Raitings) there is also a RDF/RSS file availible for the "Just off the Boat" section -- at: http://www.zope-treasures.com/sybSQL/Treasures/last7rdf regards, mark and the rest of the bees -- mark pratt (managing director) [EMAIL PROTECTED] beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299 ___ 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] For Newbies Only!
Tim Cook wrote: Ok folks if you are like me and not only can't see the light but can't even find the path to the light try these things: 1. Do the Python tutorial. Well, I hardly count as a newbie any more, but I'll just add this: Learning Python was the single most useful thing that helped me grok Zope. (Well, I digress. That plus figuring out acquisition.) It helped enormously, and despite what others have said, I think it sheds an amazing amount of light on How Things Work. :) Just my $0.02. -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 )
[Zope] (no subject)
I've previously been a Perl programmer. I did a lot of stuff where I would have multiple links with different options. Ex. a href="/path/script.pl/1234"1234/abr a href="/path/script.pl/2345"2345/abr Then, in script.pl, I would pick up the extra info on the other side from $PATH_INFO. The problem in Zope is that there is no "end" to the address. Serving from Apache, it knows that the .pl extension is the end of the path. If there's a '/' and more after it, it will push it to PATH_INFO. So how do you do this in Zope? Because it's object names instead of paths in the request, how do you send optional, additional info through the request as above? I know there has to be a way to easily do this, I just can't figure it out. ___ 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] (no subject)
This is a job for __bobo_traverse__ (yes, I know, unlikely name, but what has now become Zope used to be named Bobo). Without using __bobo_traverse__, which is defined as a method on the object which you access via traversal, you can't easily use "extra" URL elements as parameters to pass to the object. An sample __bobo_traverse__ method: def __bobo_traverse__(self, REQUEST, name): """ 'name' here is the remainder of the URL """ return self._data[name] It might be easier in your case if you're not used to python to construct your own Zope objects in which you can place a __bobo_traverse__ method to just use query string arguments instead, which are available through the REQUEST object. -Original Message- From: Leichtman, David J [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 13, 2000 2:27 PM To: '[EMAIL PROTECTED]' Subject: [Zope] (no subject) I've previously been a Perl programmer. I did a lot of stuff where I would have multiple links with different options. Ex. a href="/path/script.pl/1234"1234/abr a href="/path/script.pl/2345"2345/abr Then, in script.pl, I would pick up the extra info on the other side from $PATH_INFO. The problem in Zope is that there is no "end" to the address. Serving from Apache, it knows that the .pl extension is the end of the path. If there's a '/' and more after it, it will push it to PATH_INFO. So how do you do this in Zope? Because it's object names instead of paths in the request, how do you send optional, additional info through the request as above? I know there has to be a way to easily do this, I just can't figure it out. ___ 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] Workaround for objectValues security problem?
On Thu, Jul 13, 2000 at 12:47:56PM -0400, Andres Corrada-Emmanuel wrote: The problem, as reported in a posting from Jerome Alet last week, is that the Anonymous user does not have permission to access the objectValues method. Giving the navigation I should correct myself by saying that the objectValues method is not the real problem here but the way the dtml-in tag is processed since I can reproduce the problem with the following variant: dtml-let rootFolders="PARENTS[-1].objectValues('Folder')" dtml-in rootFolders . . . and the DTML Method that includes this code works fine called directly. But fails when called within another Document or Method by saying that Anonymous is not authorized to look at "rootFolders". The failure occurs in lib/python/DocumentTemplate/DT_In.py in the function "renderwob". I've looked at the code but it isn't easy to figure out what is going on. -- Andres Corrada-Emmanuel 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 )
[Zope] Blank Date Field?
Is there some easy way to allow for the storage and display of an empty/blank date field? It seems that you are unable to enter a blank value if you defined a property field as storing a date value. I want to be able to store dates in my object, but the date value is optional. Any tips would be helpful. James W. Howe mailto:[EMAIL PROTECTED] Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103 ___ 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] (no subject)
Thanks for responding so quickly. I'm not sure I understand. The problem here, and the reason I can't simply use a form or a session, is that I want to set a series of links that send different options to the same method. I guess it's the equivalent of passing args to a dtml method (which you can't do). It's the method I always used doing Perl. Adding stuff on to the URL is like the ghetto-style web-based ARGV. Well.. unfortunately, this isn't straight CGI nor Perl, and the URI namespace never "ends" in Zope. The way to pass args to DTML methods is via a form post or via a link with a query string (or a form get). The publisher "eats up" the rest of the URL and returns a Not Found error if you try to tack on indiscriminate things after a method name. Sorry. Your option is to write a custom object that handles this via __bobo_traverse__. I'm still not sure why you can't just do: a href="my/method?a=1"1/a as opposed to: a href="my/method/1"1/a I don't really get what __bobo_traverse__ is or how it would help. The problem isn't with grabbing stuff on the other end. If I can just get stuff to PATH_INFO, I can read PATH_INFO on the other side. The problem is that I don't know how to variably write PATH_INFO for different links. I know how to do it really easily in Perl. I would search the mail archives for __bobo_traverse__ if you want to know more. I'm not even sure if Zope exposes PATH_INFO in REQUEST. It might. I doubt it would help if it did, however. ___ 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] For Newbies Only!
"Christopher J. Kucera" wrote: Tim Cook wrote: Ok folks if you are like me and not only can't see the light but can't even find the path to the light try these things: 1. Do the Python tutorial. Well, I hardly count as a newbie any more, but I'll just add this: Learning Python was the single most useful thing that helped me grok Zope. (Well, I digress. That plus figuring out acquisition.) It helped enormously, and despite what others have said, I think it sheds an amazing amount of light on How Things Work. :) Agreed. I was a Java fan for a couple of years, so when I came to Zope I had some preconceptions about what constitutes an "object". I finally started to get the Zope and Python way of thinking when I realized you could assign arbitrary properties to objects--and those arbitrary properties are first class citizens in the language. For me, Java restricted me to a mindset that required perfection, while Python and Zope encouraged exploration without language-imposed limitations. Python made coding fun again. :-) Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Re: [Zope] LocalFS Documentation
On Thu, 13 Jul 2000, Kelvin Cheong wrote: I'm puzzled...there isn't any upload at the bottom of the page...but there has always been an upload at the top of the page in the Zope content management interface (along with "Contents", "Edit", "View", "Properties"...etc). Was the LocalFS upload support released? Earlier versions did not support upload, but I know the author was working on it. --RDM ___ 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] namespace??
How can I get the content of TITULO_CIDADE out of my tags dtml-in /dtml-in ?? My code is : dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title dtml-if "_['sequence-item'].id == CIDADE" dtml-call "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)" /dtml-if /dtml-in Thanks. Marcus Mendes ___ 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 check if the ResultSet is null?
Hi, I still got problems after I changed my code according to your suggestion. Here is the detail describtion of my code: In registration form, I have a table which contain a field usr_email (tr td width="40%" align="right"Email Addressnbsp; /td td width="60%"input type="text" name="usr_email" size="20"/td /tr) This form takes an action in which I have following lines: dtml-if search_membership pYour email address has been used. /p dtml-else dtml-call personinfo_insert h2Welcome dtml-var name="usr_fname"! You became a new user./h2 /dtml-if where "search_membership" is an ZSQL method (select usr_email from personinfo where usr_email = dtml-var name="usr_email") and "personinfo_insert" is a ZSQL method which insert the data to the table("personinfo") My idea is first checking if usr_email is in the table, if so, do not insert, otherwise insert. If I just use dtml-call personinfo_insert, everything is fine. However, when I added the dtml-if as above, I got the following error: Zope has encountered an error while publishing this resource. Error Type: KeyError Error Value: usr_email Could you help me out? Thanks! Sa Hi, Hi, I stuck on a problem: I am creating a registration form. I need to check if the person info has already in database. I created a Z SQL method which I used "select usr_email from info(table name) where usr_email = dtml-sqlvar usr_email type=string" I want to call this method from my dtml method and see if it returns "null". But I'm not sure how to implement this. In Java, it has ResultSet which I can let's say, you called your ZSQL-method "getThisAddress" then you can do something like this: dtml-if getThisAddress You are already in the database /dtml-if Robert -- Robert Wohlfahrt ([EMAIL PROTECTED]) Tel: 0179 / 2980074 Fax: 0351 / 2880145 ___ 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] simple instructions for site search
On 13 Jul 2000, at 9:49, Chris Withers wrote: ethan mindlace fremen wrote: You want the ZCatalog Howto: http://www.zope.org/Documentation/How-To/ZCatalogTutorial Do catalogs search otehr catalogs they find? Only asking 'cos I don't think that'll help him search his whole site as the Squishdot postings won't get searched. But, if the above is true, then it should be okay since Squishdot is now subclassed from ZCatalog :-) cheers, Chris Does this explain why I see Squishdot and ZChat messages in the catalog, but when I search for something in squishdot or Zchat I get no matches? I am still running squishdot 3.x I do have the catalog included in my searched items. --Sean ___ 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] LocalFS Documentation
Kelvin Cheong writes: Anybody know where I can find out more about LocalFS, I've already read jfarr's How-to's and Product Information. But I still need more on how it works. It helps to pay very careful attention to the help info (in .../Products/LocalFS/methodHelp.dtml if you're not running 2.2 yet). Beyond that, there's only the source... !--#var standard_html_header-- H2!--#var title_or_id-- !--#var document_title--/H2 P dtml-with REQUEST dtml-call "REQUEST.set('userTABPIX1',REQUEST.form['userTABPIX1'])" dtml-call "manage_addImage('',userTABPIX1)" /dtml-with !--#call "TutadobeInsertMethod(REQUEST)"-- Data Has Been Successfully Inserted! !--#var standard_html_footer-- I tried replacing (blindly) the dtml-with REQUEST tag with both dtml-with myLocalFS1 and dtml-in myLocalFS1, and as to my expectations it did not work. How would I actually upload to the LocalFS object (myLocalFS1) I've created? To programatically upload a file you need to: 1. Get the file info in a FileUpload object. The normal way to do this is via a form input tag of type "file". 2. Call myLocalFS1.manage_upload(file, REQUEST). For dtml, that would look something like: dtml-call "myLocalFS1.manage_upload(file, REQUEST)". Warning, the current official version of manage_upload will try to display a MessageDialog page that will send you to the management pages if REQUEST is not None. I've patched my version to redirect back to 'index_html' instead, which makes much more sense if you allow users without management rights to upload files. For a very useful sample, the default LocalFS index_html page is .../Products/LocalFS/methodBrowse.dtml. It includes an upload link that uses manage_uploadForm, which is a standard Zope method defined in several files in .../lib/python/OFS. I think that the one this page will use is defined in DTMLMethod.py to be documentUpload.dtml in the same directory. Hope this helps, Dan Pierson ___ 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] Blank Date Field?
"James W. Howe" wrote: Is there some easy way to allow for the storage and display of an empty/blank date field? It seems that you are unable to enter a blank value if you defined a property field as storing a date value. I want to be able to store dates in my object, but the date value is optional. This is fixed in 2.2, which should be released mere days from now. -- ethan mindlace fremen Zopatista Community Liason Abnegate I! ___ 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] Case sensitivity
One of my pet peeves with web servers is that : mysite.com/Members is different to : mysite.com/members (but there is no difference between MYSITE.COM and mysite.com) is there any way of making Zope case-insensitive? - Ian Sparks. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Re: [Zope] LocalFS Documentation
Was the LocalFS upload support released? Earlier versions did not support upload, but I know the author was working on it. Yup. Since 0.8.1. --jfarr "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 )
[Zope] Newbie: Zope a webserver? Serving PHP and Perl
Title: Newbie: Zope a webserver? Serving PHP and Perl Hi Have just installed Zope under Win2K and it works fine - I see a lot of people mention using Apache to server Zope, but isnt Zope a webserver itself? I can browse to http://server:8080/ and view Zope pages, so why would I need Apache? Also, How do I set Zope up so it handles PHP tags? thanks in advance Lucas Young
RE: [Zope] Newbie: Zope a webserver? Serving PHP and Perl
Lucas, If you don't know of a reason you would need Apache, you don't need it. :-) Zope does not directly handle PHP tags. -Original Message- From: Lucas Young (c) [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 13, 2000 6:44 PM To: '[EMAIL PROTECTED]' Subject: [Zope] Newbie: Zope a webserver? Serving PHP and Perl Hi Have just installed Zope under Win2K and it works fine - I see a lot of people mention using Apache to server Zope, but isnt Zope a webserver itself? I can browse to http://server:8080/ and view Zope pages, so why would I need Apache? Also, How do I set Zope up so it handles PHP tags? thanks in advance Lucas Young ___ 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] Still Problem with LocalFS
I have had a similar problem. My solution is based on an external method. I have a folder named localFS with 1) a Local File System named images pointing somewhere in file system. 2) an ExternalMethod called addFile looking like this: def addFile(self, file, fullpath): outfile = open(fullpath, 'w') outfile.write(file.read()) ___ the Upload form has this input: INPUT TYPE="file" NAME="file" SIZE="25" VALUE="" the action-method looks somewhat like this. dtml-call "REQUEST.set('fullpath',localFS.images.getProperty('basepath'))" dtml-call "REQUEST.set('imgresult',localFS.addFile(file,fullpath))" This is all very new to me. The file is there, and I can read it, so it should work, I guess. There's no error checking though, so be careful. I also intend to let the external method return something meaningful instead of None. best regards Jørgen ___ 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] zope.org going down for upgrade
Zopatistas: zope.org will be going down the morning of Friday the 14th during the transition to zope 2.2. It should be no more than a 15 minute downtime. In the mean time, if you want to hit http://www.zope.org:666/ to see if it works, feel free! -- ethan mindlace fremen Zopatista Community Liason Abnegate I! ___ 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] what permissions are required for [un]restrictedTraverse?
what permissions are required for [un]restrictedTraverse? I recently added the call to 'restrictedTraverse()' in a method and I can't get permission to use it except when I'm logged in as superuser. I need to be able to let other users use this method. How do I do that? Thanks, Jason __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HTMLFile from within a method?
Rob Miller wrote: Greetings. I'm a fairly experienced Python programmer, but am new to Zope. I'm working on a Python product, and through this process I'm learning my way around the Zope innards. I'm running Zope 2.2.0b3 on an RH6.1 box. By declaring a class member that is an instance of the HTMLFile class, I can publish dtml files. This is right out of the "Boring Product" How-To; it looks like this: -- class Product(Implicit, Persistent, RoleManager, Folder): index_html = HTMLFile('index', globals()) -- Then when I browse to an installed instance of my Product, I'll see the appropriate output generated by my 'index.dtml' file, which is in the same directory as my Product's python modules. What I'm having trouble doing is something similar but from within one of my Product class's methods. I've tried this: -- class Product(Implicit, Persistent, RoleManager, Folder): def form_handler(self, REQUEST=None): return HTMLFile('form_results', globals()) -- This causes the output to be munged, like so: lt;dtml-var standard_html_headergt; lt;dtml-in quot;REQUEST.keys()quot;gt; ... and so on ... I've also tried: -- class Product(Implicit, Persistent, RoleManager, Folder): form_results = HTMLFile('form_results', globals()) def form_handler(self, REQUEST=None): return self.form_results() -- This should work u change the last line to return self.form_results(self,REQUEST). You need to explicity pass the namespace to it, ie 'self'. You may or may not need to pass REQUEST as well. This causes zope to attempt to publish the object, but the object (my DTML method, stored in "form_results.dtml") doesn't seem to have access to the Product's namespace. That is, I get an error like: Error Type: KeyError Error Value: standard_html_header ...even though there's definitely a standard_html_header defined. Finally, I've tried this: -- class Product(Implicit, Persistent, RoleManager, Folder): def form_handler(self, REQUEST=None): dtml = open('lib/python/Products/Product/form_results.dtml', 'r') s = dtml.read() dtml.close() return s --- This causes the right data to be passed out, but it's not treated as dtml. A garbled version of my output appears in the browser window, and if I view source I see: htmlhead/head dtml-var standard_html_header dtml-in "REQUEST.keys()" ... and so on ... I know there are other ways to accomplish what I'm trying to accomplish, but I really want to understand what's going on here. Can anyone enlighten me as to why I'm seeing the results I'm seeing? Does anyone have suggestions for an appropriately Zen approach to publishing dtml files from within a Product's methods? Thanks for your time, rob ___ 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 ) -- Terry Kerr ([EMAIL PROTECTED]) Adroit Internet Solutions Pty Ltd (www.adroit.net) Phone: +613 9563 4461 Fax: +613 9563 3856 Mobile: +61 414 938 124 ICQ: 79303381 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ANN: Zope Treasures - ZClass/Product Search Engine (fwd)
This thing looks COOL! -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] Linux user group
Curtis, I 'run' the LiBC --Linux in Boise Club--- and the website(s). We run Zope. You can show them: http://www.libc.org http://theigloo.libc.org As examples, and I might be able to be talked into converting one or two of them into CDROM demos... Though they are both being migrated to 2.2, and improved in the process. ---note: the first URL is a ZEO server ;-) hmmm... somthing tells me ZEO on a CDROm could be righteous -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] Variable sort in dtml-in
Aaron Williamson wrote: In my search form, I have a selection box "in_sort_by" whose value can be "Category", "Field", or "Title". I am trying to make dtml-in sort by this value. I am using: dtml-in SQL_search sort="_['in_sort_by']" size=list_size start=query_start And I've tried other variations, but I always get an attribute error. The strange thing to me is that list_size is also a variable and it works fine, but I've tried just using in_sort_by and that doesn't work. What am I missing here? http://www.zope.org/Documentation/How-To/index_html/view_source should give you some ideas... -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] Ho do you access parent's parent folders?
hi, any one knows how to access methods or queries in the parent's parent's parent's subfolder? Root -Folder1 --Sub1 --My_Qry --Sub2 ---otherfolder How_to_access_My_Qry_from_Sub1 is there dtml-var parent.parent. type thing??? or do you have to call the parentobject method and assign it to some object before getting to it? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope Knowledge Base on www.faqts.com?
Hi, I've been working on a Python knowledge base for the last couple of months. http://python.faqts.com Each day I go through postings to the newsgroup and enter those that I believe would be useful FAQs into the site, then I send out a summary to the group letting them know what's been entered. Recently I've been thinking about incorporating content from this mailing list in a folder dedicated to Zope. And sending out my daily summary to this list as well. Basically I'm after some feedback, would this be of much interest? I've had a couple of people write and request that I do this - what's the general consensus? Thanks, Fiona Czuczman ___ 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] Newbie: Zope a webserver? Serving PHP and Perl
Title: Newbie: Zope a webserver? Serving PHP and Perl Your second question almost answers the first. You can use Zope either with or without Apache. One way to handle existing PHP sites is to put Apache in front of Zope. Then add configuration parameters to Apache to make it examine the URLs of requests. If the URL is for PHP pages, then handlethe request in Apache/PHP. If the URL is for Zope pages, pass it over to Zope. That way you don't even have to think about making Zope do PHP. As for setting "Zope up so it handles PHP tags", I'll let someone else answer that, 'cause I don't know for sure whether it can even be done. -- Loren - Original Message - From: Lucas Young (c) To: '[EMAIL PROTECTED]' Sent: July 13, 2000 03:44 PM Subject: [Zope] Newbie: Zope a webserver? Serving PHP and Perl Hi Have just installed Zope under Win2K and it works fine - I see a lot of people mention using Apache to server Zope, but isnt Zope a webserver itself? I can browse to http://server:8080/ and view Zope pages, so why would I need Apache? Also, How do I set Zope up so it handles PHP tags? thanks in advance Lucas Young
Re: [Zope] Acquisition problems?
On Thu, 13 Jul 2000, Stephen Harrison wrote: Curtis Maloney wrote: [snip] Well, here's the details: / standard_html_header register /internal/ standard_html_header register works fine if invoked as /register however, it spits the dummy if invoked as /internal/register Complaining loudly about TypeError: too many arguments; expected 2, got 3 in standard_html_header. Is register a method, or a document? If it is a method the when you It is a document. call /internal/register you are calling the object internal with the method register, so when it looks for standard_html_header it will first look in internal, before doing the acquisition thing. So it finds internal/standard_html_header. If it is a document, then you are calling the object /register, in the context of internal, but the containment of / so you get /standard_html_header. Yes, well.. This is what I worked out from the Acquisition Algebra tute, and from MP, but this is not what the actions of the site suggest. When I modified /internal/standard_html_header, the actions of register as /internal/register changed. This is what has me so confused. That, and the fact the page give an error at all, when it works frine as /register. In algebra terms, if register is a method, you have (internal o /) but if register is a document (or folder, or other object) you have ((register o /) o (internal o /)) This is how acquisition (simple acquisition) behaves. Of course, I am strongly of the opinion that this method of acquisition is of very limited use and zope should really use natural acquisition (see http://www.zope.org/Wikis/zope-dev/AcquisitionUsage for a definition). [snip] As it is, in order to achieve the result described above you have to carefully construct your site in order to work around the problems with acquisition, which really isn't the way we should be doing things. Well, it just so happens this is what I'm doing next. (o8 I was handed this site to "fix", which has taken a lot of work. However, rewriting it properly would have taken longer, and the project was already overdue. Sorry to go on about this, but as time passes I am becomming more and more convinced that the method of acquisition needs to change from containment before context to context before containment. Rant away, please. I believe it can be a great way to provoke ideas in other people. Besides, if we never complained, how would they know there was a problem? (o8 I have yet to think of any advantages provided by the current method, but I would be more than happy to hear of any. Cheers, Stephen Thanks for trying, Curtis. ___ 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] Version Changes
When Saving changes from a version are the notes entered in the text box logged anywhere? I can't seem to find them or any information about them. It would be handy to use them for a regular CHANGES file. -- 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] help
how can I fix this?? the main dtml file has the following line dtml-var SomeVar !-- there is a valid namespace SomeVar and this line prints it out... -- !-- the next line works fine with Number 5, but not if I substitute SomeVar instead of 5 -- dtml-var "Some_Header(style=Some_Style_css(SomeKey=5))" - the Some_header dtml file has the following lines- style --! dtml-var style --! /stile - the Some_Style_css dtml file has the following lines-- input{ position: relative; font-size: dtml-var SomeKey } -- Now the whole thing works great.. however, if I attempt to make NUMBER 5 by any variable from REQUEST or the current form the KeyError comes up : if instead of 5 I put SomeVar (which was passed to this dtml from some other form) I get "Error Type: KeyError Error Value: SomeVar" ___ 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 Knowledge Base on www.faqts.com?
[Fiona Czuczman, on Thu, 13 Jul 2000] :: Hi, :: :: I've been working on a Python knowledge base for the last couple of :: months. :: :: http://python.faqts.com Yes, Fiona, thank you. I'm a fan! :: Recently I've been thinking about incorporating content from this :: mailing list in a folder dedicated to Zope. And sending out my daily :: summary to this list as well. :: :: Basically I'm after some feedback, would this be of much interest? I've :: had a couple of people write and request that I do this - what's the :: general consensus? I think that would be a wonderful addition to the Zope resources!! ___ 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] Zope 2.2.0b4: Congrats on a job well done + Tips for upgrading
Hi, there, I'd just like to announce that I've installed Zope 2.2.0b4 via CVS and done a complete run-through of my site. It seems to work flawlessly now, and I've gone ahead and installed it on my main port for a trial period. I hope to launch the site using the final version of 2.2.0 (so hurry up, developers!!) :) Anyway, upgrading wasn't without its problems, so let me share with you some tips that will help those in my situation upgrade more successfully. Note that I've skipped some steps, with the assumption that since your upgrading an existing Zope version, you already know how to install Zope. Directories cited: Original installation: /usr/Zope-2.1.6 Fresh install of 2.1.6 (for diff'ing changes I made in the python modules): /temp/Zope-2.1.6 New CVS install of Zope-2.2.0b4: /usr/local/Zope2 (I moved it to the /usr/local volume because I had more space there). Products installed: SQLSession SiteAccess TinyTable ZMySQLDA (your product list may vary) FIRST, I like to hack the source a lot. I have my own special comment tags, such as !--#c ... -- instead of dtml-comment ... /dtml-comment, and I have my own special dtml-var modifier, js_friendly, which quotes all special characters so I can use them in JavaScript code. On a tip from Shane, I started using CVS to download the Zope source code so that it would merge the changes made in each upgrades with the changes I've made to the source. (Do a search for "CVS" on Zope.org). However, this was my first CVS, so I still needed to bring over the changes I'd previously made. So... cd /usr/local/Zope2 diff -rc /temp/Zope-2.1.6/lib/python /usr/Zope-2.1.6/lib/python MyChanges.diff patch -p3 MyChanges.diff NOTE: Results may vary. By the way, incase you don't want to mess around with CVS (or you're like me and can't figure out how it works), the above commands should achieve the same effect, although you might get a few failed hunks and have to fix them manually. If you don't modify the Zope source, you can skip this step. SECOND, I had all my data, external methods, and installed products on my old installation. I didn't want to lose them. Now, don't be tempted to just copy all your Products over from the lib/python/Products folder. Some of them, such as SiteAccess and SQLSession, if you have them, WON'T WORK. (Furthermore, they'll break your installation, and you won't even be able to get to a management screen). Here's what you do: 1. Back up your new var directory (incase something goes terribly wrong) and copy the old data over. cd /usr/local/Zope2 mv var var.bak cp -R /usr/Zope-2.1.6/var . 2. Copy your external methods over. cp -R /usr/Zope-2.1.6/Extensions 3. Copy *some* (not all) of your Products over. cd lib/python/Products cp -R /usr/Zope-2.1.6/lib/python/Products/TinyTable . cp -R /usr/Zope-2.1.6/lib/python/Products/ZMySQLDA . 4. Start Zope (you may have to modify the startup script and the superuser password) and load the management interface. Delete all your SiteRoots and SQLSessions. You'll have to re-create them. 5. If you're like me, you created all your 2.1.6 objects using the superuser account. You can't do that in 2.2.0. So, go to your acl_users folder and create a new account having Manager and Owner privileges. 6. Download and install new versions of SQLSession, SiteAccess, and possibly ZMySQLDA, if you have it. (Be warned, though, you may have to re-create all of your database connections and SQL methods!) 7. Re-start Zope and log in as the new account you just created. Take ownership of your root directory. (Click "Ownership" tab, then "Take Ownership"). 8. Re-create your SQLSessions and SiteRoots. Check your database folder to make sure your SQL sessions are all intact. (If not, you have no sympathy from me. I had to re-create all 40 of mine when I tried beta 2). 9. Check for bugs -- I'm sure you'll find plenty! If you're getting a lot of Unauthorized errors using external methods, check all your external methods and make sure each class has the property "__allow_access_to_unprotected_subobjects__" set equal to "1". For instance, I had a bunch of simple objects created this way: class simpleClass: pass Under 2.2, I had to do it this way: class simpleClass: __allow_access_to_unprotected_subobjects__=1 pass THIRD, I'm waiting for the next release of Zope so that I can test out this CVS feature. I'm excited! Upgrading is such a pain, and I'm hoping CVS can help to automate that somewhat. I'll let you know how it goes. One very wise thing to do before every CVS checkout, though, is a complete backup of the Zope directory! After four failed upgrades (including the alpha), I don't want to take my chances. Thanks, Zope developers, for an