[Zope-dev] Python (File) Product Permission Handeling
Hello everyone, I am writing my own Python Product and it is going well so far, except that some of the default permissions will not transfer. I have an ObjectManager object that contains another ObjectManager-based object. The first inherits the permissions of Zope just fine, but in the second one I am only allowed to view manage_main, but all other self-defined manage screens I am unable to see. For example: I created a manage_blah method, but when I try to view its label (manage_tabs) I get an unauthorized error from the manage_workspace method. The user I am using is Owner and Manager (Zope Version 2.2.0b2). Regards, Stephan -- Stephan Richter - (901) 573-3308 - [EMAIL PROTECTED] CBU - Physics Chemistry; Framework Web - Web Design Development PGP Key: 735E C61E 5C64 F430 4F9C 798E DCA2 07E3 E42B 5391 ___ 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] Proposed interface: Restricted creation
On Wed, 05 Jul 2000 19:42:38 +0300, Itamar Shtull-Trauring [EMAIL PROTECTED] wrote: Shane Hathaway wrote: The place where this is needed most (IMHO) is for ZClass factories. So there needs to be a way to create meta type filters through the Web. Yes, but in Python products too, where you have Items that should only go in specific ItemHolders. This is very common. I have a beautiful hack to do this for python products.. Firstly, this code goes in your product __init__ def register__class(context,klass,**kwargs): meta_type = _register_product_specific_type(context,klass,kwargs) if meta_type: _meta_types_registry = _meta_types_registry+(meta_type,) def _register_product_specific_type(context,klass,kwargs): """Hijack and abuse the product registration system for our own product-specific type. The mechanism for creating instances of this product is established, but the type is not entered in the global availability list. """ # Register the class old = Products.meta_types[:] apply(context.registerClass,(klass,),kwargs) new = Products.meta_types if new[:-1]==old: # A new meta_type was added to the end of the global list, as expected. # Remove it, and return it Products.meta_types = old return new[-1] else: # Something unexpected happened. The safest thing to do is leave it alone return None Then, in your ObjectManager derived container, add def all_meta_types(self): return _meta_types_registry Then use register_xxx_class(context,.. in place of context.registerClass. Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] _delObject Method
Hello! Can anybody tell me, what the 'dp=1' attribute in the _delObject methods of the ObjectManager (OFS/ObjectManager.py) and ZClassMethodsSheet (ZClasses/Method.py) Class are for? I haven't found any method call, where dp is set and the methods themselves don't use it aswell. I would like to use it as a switch for (not) calling the manage_beforeDelete method, when the _delObject method is called by CopySupport.manage_renameObject and CopySupport.manage_pasteObject. In these cases, manage_beforeDelete would not be called. To me that seems to be correct, because during a cut-paste and a rename operation the Objects are not really deleted, they are just temporarily taken out of the object-tree and then inserted again. Are there any problems with that? Or is 'dp' used for another purpose in an older or a newer version of Zope (I use Zope 2.1.6)? -OFS/ObjectManager.py-line 277- def _delObject(self, id, dp=1): object=self._getOb(id) if dp: object.manage_beforeDelete(object, self) self._objects=tuple(filter(lambda i,n=id: i['id']!=n, self._objects)) self._delOb(id) --- -OFS/CopySupport.py-line 225 and 259--- ob.aq_parent._delObject(id, 0) --- Thanx, Gregor! ___ 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] _delObject Method
Can anybody tell me, what the 'dp=1' attribute in the _delObject methods of the ObjectManager (OFS/ObjectManager.py) and ZClassMethodsSheet (ZClasses/Method.py) Class are for? I haven't found any method call, where dp is set and the methods themselves don't use it aswell. I would like to use it as a switch for (not) calling the manage_beforeDelete method, when the _delObject method is called by CopySupport.manage_renameObject and CopySupport.manage_pasteObject. In these cases, manage_beforeDelete would not be called. To me that seems to be correct, because during a cut-paste and a rename operation the Objects are not really deleted, they are just temporarily taken out of the object-tree and then inserted again. Are there any problems with that? Gregor - I think that what you are talking about is already implemented for 2.2... Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Overriding a method in an instance.
Hi, I guess this should be a feature request for the collector but I thought I'd see what other people thought first... I'd really like to be able to override methods in an instance of an object. Examples I can think of are Squishdot and the Tracker. In Squishdot, or any ZCatalog for that matter, it'd be great to override searchResults to return what I want, formatted how I want. In Tracker, the same could be said for index_html. These may be bad examples, but hopefully you see what I mean... Anyway, if you do try to override, you get a 'This id is already in use' error. How do you get around it and how should this problem be solved? 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] Overriding a method in an instance.
Monty Taylor wrote: Make a folder that contains the overridden methods and call things through the context of that folder. Neat trick :-) We love acquisiton, but it won't quite do it :( The default index_html will get called, unless you put /folder/ on the end of your URL. which is horrible :( In the case of what it seems you want to do I'd say sub-classing is going to be your real answer. Actually, the more important case is for Trackers, where you probably want them to look/act differently on an instance by instance basis. This is mainly for presentation methods, but there's no reason if it's solved for them, it can't be used for any other methods... I imagine it'd need playing with python name spaces and/or acquisition to implement, but might well be worth it. cheers, Chris PS: For acquisiton, is it context before containment or containment before cotext? ___ 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] NASTY error. Why?
Hi, I'm trying to do a tree walk and copy with: dtml-in objectValues dtml-call "REQUEST['where'][-1].manage_addFolder(id)" Created dtml-var id in dtml-var "REQUEST['where'][-1].id"BR dtml-if "meta_type=='Folder'" dtml-call "REQUEST['where'].append(this())" dtml-var iterate dtml-call "REQUEST['where'].pop()" ...etc... but I get the following truly horrible error from the manage_addFolder any ideas? Chris Error Type: TypeError Error Value: read-only character buffer, Python Method Traceback (innermost last): File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/zope/2-1-6/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/zope/2-1-6/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: start) File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: start) File /usr/local/zope/2-1-6/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: start) File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: start) File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_With.py, line 148, in render (Object: o-e-s) File /usr/local/zope/2-1-6/lib/python/OFS/DTMLMethod.py, line 146, in __call__ (Object: iterate) File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: iterate) File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_In.py, line 691, in renderwob (Object: objectValues) File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: REQUEST['where'][-1].manage_addFolder(id)) (Info: REQUEST) File string, line 0, in ? File /usr/local/zope/2-1-6/lib/python/OFS/Folder.py, line 119, in manage_addFolder (Object: ElementWithAttributes) File /usr/local/zope/2-1-6/lib/python/OFS/ObjectManager.py, line 231, in _setObject (Object: ElementWithAttributes) File /usr/local/zope/2-1-6/lib/python/OFS/ObjectManager.py, line 200, in _checkId (Object: ElementWithAttributes) File /usr/local/zope/2-1-6/lib/python/ts_regex.py, line 139, in match TypeError: (see above) ___ 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] Overriding a method in an instance.
Chris Withers wrote: Monty Taylor wrote: Make a folder that contains the overridden methods and call things through the context of that folder. Neat trick :-) We love acquisiton, but it won't quite do it :( The default index_html will get called, unless you put /folder/ on the end of your URL. which is horrible :( In the case of what it seems you want to do I'd say sub-classing is going to be your real answer. Actually, the more important case is for Trackers, where you probably want them to look/act differently on an instance by instance basis. This is mainly for presentation methods, but there's no reason if it's solved for them, it can't be used for any other methods... I have an idea: the _objects attribute of ObjectManagers could include a "configurable" flag, which would tell _checkId that the object can be overridden. PS: For acquisiton, is it context before containment or containment before cotext? Interesting situation, that... it's always containment before context, but standard practice in DTML figures out what initial container to use from the context. I just figured that last week. To determine context, you get obj.aq_parent. To determine the container, you get obj.aq_inner.aq_parent. The strange thing about DTML methods is that namespace attributes are essentially derived from method.aq_parent. method.aq_parent could be anywhere and is determined by the second-to-last element in the URL. But from there, acquisition continues normally, searching via containment first and then context. So it's mostly right-to-left, but sometimes left-to-right, and sometimes in a less than predictable order. I have an external method that makes it clearer, if you're interested. 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] NASTY error. Why?
From: Chris Withers [EMAIL PROTECTED] dtml-call "REQUEST['where'][-1].manage_addFolder(id)" Error Type: TypeError Error Value: read-only character buffer, Python Method Looks like the 'id' of something along the line is a method rather than a string. Try "_.getitem('id', 1)". Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] NASTY error. Why?
Evan, Thanks, that worked... Evan Simpson wrote: From: Chris Withers [EMAIL PROTECTED] dtml-call "REQUEST['where'][-1].manage_addFolder(id)" Error Type: TypeError Error Value: read-only character buffer, Python Method Looks like the 'id' of something along the line is a method rather than a string. Try "_.getitem('id', 1)". I thought I'd seen it all when it came to Zope being bad, but this is TRULY horrible, it even beats (_,_.None,...) and I thought that would never happen... Can someone please tell me why folder.id is a method and everything-else.id is a string? Should I chuck this in the collector? (I think I will anyway! :P) Excuse me while I go off to be sick ;-) 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] NASTY error. Why?
Chris Withers wrote: Can someone please tell me why folder.id is a method and everything-else.id is a string? Sorry, that should be folder.id is a string and everything-else.id is a method. 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] More comments on ZPatterns
At 04:40 PM 7/9/00 -0500, Steve Spicklemire wrote: Wow.. alright. I think I need "ZPatterns for Dummies" or maybe there needs to be a disclaimer "ZPatterns are NOT for Dummies." ;-) I've pretty much given up on Sheets for now. Nothing I've tried has actually worked. I thought maybe I needed to switch to 2.2, but then all the code that *was working* stopped working... It's possible that something *is* broken. Ty and I are not yet using ZPatterns-based propertysheets for production work, and anything we don't use yet for production work isn't as thoroughly tested. (e.g., I would get permission errors when I tried things like "ni=newItem('foo')"... "ni.propertysheets.get('Basic')" 'get' is disallowed... in 2.2 somehow.. "Basic" is a propertysheet defined in the ZClass for my instances.) This appears to be a Zope bug; OFS.PropertySheets.PropertySheets does not define roles/permissions for the "get" method. This should probably be put in the Collector. Maybe someone could just say, in a plain, step-by-stepish sort of way, how to add/delete/etc sheet providers for a pure ZClass based object at any time at all. (I would be happy to start over, if I felt I knew what I was doing!) I'm not sure what you're asking for here; I thought you previously quoted from an explanation of how to do that. Anyway... I went back to 2.1.6 and finally got triggers working. I thought I would share a minor success and ask the ZPatterns gurus if this is 'right' so that I might not go too far down the 'wrong' road! I defined a Generic Trigger in my defaultRack's Data Plugins that managed the same attributes that I have defined in my "Generic Attribute Provider" in the same Rack, for the same instances. The only persistan attribute is the id of the object, which turns out to be the primary key of a single table in MySQL that I use for my SQL based attributes. My Generic Trigger has You don't need "id" to be persistent, if all it's for is to map to the SQL database. Just make sure your GAP returns NOT_FOUND (if the record doesn't exist) for some attribute you can then use as your "load attribute" on the Storage Settings tab of the Rack. (If you were keeping "id" persistent so that you could use the getPersistentItemIds() method, note that you can use an SQL method for that purpose instead.) (I had to make the last attribute unconditionally set since otherwise the extra comma created an SQL syntax error if it was excluded... could sqlgroup fix this?) No, but you could use the CHANGED_ATTRS() function instead and use an "in" loop. CHANGED_ATTRS() returns the list of attribute names which were set or deleted during the transaction. You could then use: dtml-unless sequence-end,/dtml-unless to add the comma between SET clauses. You would still, of course have to do conditional code for the types of your variables. My only problem was that I couldn't trigger the trigger! In the past I've always called manage_changeProperties to adjust an ZClass's properties. But since only the ID is stored persistently... that doesn't make any sense. Instead I ended up creating an external method: manage_changeProperties is an ideal way to change the attributes, actually. The only problem is that a "common instance property sheet" won't work, as Ty and I found out last week when we tried to build a production app using GAP's and GenericTriggers. The problem is that when a default attribute is set on the ZClass, __getattr__ doesn't get called on the instances for that attribute, so you can never get the value from your database. You can change the properties all you want, and your database will be updated, but you'll still never see the data in Zope. So I've added a new kind of property sheet, a "DataSkin Property Sheet", which sets default attributes as "class_default_for_X" names in the ZClass. DataSkins already support defaulting to class_default_for_X if an attribute provider doesn't come up with something, so it works out quite well. Trick is, I haven't released this new feature yet; I only added it Thursday evening and there are some other unfinished bits as yet. The approach you took, with external methods, is the approach Ty took as a workaround until I got DataSkin Property Sheets together, and is a reasonable way to deal with it for now. That called the external method to actually trigger the "Generic Trigger". It did work... I can't help but wonder if I missed some obvious and much simpler way to accomplish this! You didn't miss it; this is a defect in ZPatterns which I discovered when Ty began building a production app similar to yours in what it uses in ZPatterns. As with many things in ZPatterns, it's not so much that it's inherently complicated as it is unfinished, undocumented, and untested. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -
Re: [Zope-dev] More comments on ZPatterns
At 10:02 AM 7/10/00 -0400, Shane Hathaway wrote: Phillip, What if the management interface for specialists provided a way to manipulate, or at least view, the table of virtual objects (or, in ZPatterns-speak, DataSkins)? Wouldn't that make ZPatterns more accessible? Probably. The sticking points are twofold, however. 1) I'm not sure what a default for such an interface would look like, and so am holding off until Ty and I have built a couple of ones for "real life" use. 2) I need a good way to make the methods overrideable without any subclassing (whether in Python or ZClasses), since Specialists "want to be singletons". I have an idea about how to make Specialist and similar ObjectManagers able to permit adding of attributes that they already have, so long as it's a *class* attribute and not a manage_* method, but I haven't had time to implement it yet. If ObjectManagers did this themselves (wink wink, nudge nudge) it would lift a lot of restrictions I'm currently holding to with regard to default interfaces on Specialists, Racks, UserSources, etc., because then users could override them at a whim. I think this may relate to an existing interest of yours regarding specification of interfaces and overriding them in instances; I'd be interested in hearing your comments regardless. ___ 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] Request for amplification on new Product permissions API.
On Fri, 7 Jul 2000, Brian Lloyd wrote: Are you calling: Globals.default__class_init__(MyBasketClass) on your Basket class? This is (poorly documented but) necessary for permissions declared in __ac_permissions__ to be correctly initialized. Poorly? grin Only three classes seem to use this in the base Products: MailBase in MailHost, Draft in OFSP, and ZCatalog. shrug I've added a call to this method to the end of the file that defines this class. My __ac__permissions__ structure assigns 'View' privilege to the 'items' method. I still get an unauthorized error when the dtml tries to access that method on the subobject. --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] NASTY error. Why?
Interesting commentary from the Interfaces Wiki: http://www.zope.org/Members/michel/Projects/Interfaces/ObjectM anagerItem """Some old objects provide id methods that return ids. This practice should be avoided for new objects. We can't change the old objects for backward compatability reasons. Maybe we should fix this in Zope 3.0.""" This is one of the things on my List Of Evil Things that should be changed one day in Zope3K :) Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] LoginManager patch considered harmful
"Phillip J. Eby" wrote: At 09:22 AM 7/10/00 -0400, Shane Hathaway wrote: The new security machinery actually provides a different way to solve this problem. Since we now have an execution stack, we can limit that stack, causing an exception to be thrown rather than letting it overflow the C stack. It would actually be more reliable than the current mechanism, which depends on DTML namespaces. That would probably be a good idea, independent of LoginManager et al. Well, guess what... Jim's ahead of both of us. Not only is the stack size limited, but the limit is easily configured through an environment variable. I never give this guy enough credit. :-) See lib/python/AccessControl/SecurityManager.py, especially addContext(). If the LoginManager is created by the superuser and is used as the root authenticator, it stays unowned, so the ownership problem should not occur. If that is not the current behavior then it needs to be corrected. That is not the current behavior, unless _owned=UnownableOwner is placed in the class. It looks like Brian decided, for the latest beta, to make ownership forgiving in the presence of an _owner class attribute. This should solve the problem for Generic User Source. Generic User Folder is going to need the _owner attribute. If untrusted users are allowed to add LoginManagers, the methods called to get ownership information should be owned by them. This is to avoid the server-side trojan horse. Understood. I'll try to keep that use case in mind. Keep in mind, however, that being able to create a LoginManager is a pretty risky business in a portalish environment - you could potentially get access to somebody's password, since after all you will control an actual login screen! (Note however, that someone can create a phony login screen in DTML and bypass the entire Zope security model with a little "social engineering" anyway.) I've thought of that as well. Perhaps we'll have to accept that the new model just doesn't lend itself to the area of configurable user databases. Also note that it is not necessary to give a user access to the full power of LoginManager. One could give them rights only to add a small subset of the available UserSources and LoginMethods. It would probably be a bad idea to give them the ability to add a GenericUserSource, which is where most of the potential for mayhem lies. Better to give them some sort of PersistentUserSource, with no ability to do much. Now, the problem still remains that ownership information cannot be retrieved if the method that gets ownership is in ZODB, is owned by a user defined in that user folder, and has to call another method. Note that this also applies to Generic User Folder. Yep. The problem is that the superuser *can't* create those methods in the root folder, so there's no place to bottom out the recursion at present. With the correction in the execution stack, instead of killing Zope, an attempt to authenticate that way will result in a controlled stack overflow. Unless you can come up with another option, we can either break the security model or slightly reduce the capabilities of LoginManager. What would you do if you were in my position? Well, I'm hoping you'll take a look at my Collector suggestion for a new Zope feature. :) Specifically, extending the "access" file to allow other "top-level" users to exist besides the superuser, who have roles defined in the file. There are many ways this would be useful, not the least of which is to break the "you need to do that at the next level up" problem. (Others include a simplified process for getting your Zope site set up, since you then don't have to login as superuser and add a user folder, then log back in as somebody else.) If this were done, we could easily go to letting LoginManager objects be owned, since there'd always be a place "above" the LoginManager for the owner user to reside. Hmm... this sounds like a good idea, but now that the ownership problem has been resolved in a way I didn't expect, the issue that motivated your idea is gone. 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] Expanded access file (was Re: LoginManager patch consideredharmful) harmful)
At 03:07 PM 7/10/00 -0400, Shane Hathaway wrote: "Phillip J. Eby" wrote: Understood. I'll try to keep that use case in mind. Keep in mind, however, that being able to create a LoginManager is a pretty risky business in a portalish environment - you could potentially get access to somebody's password, since after all you will control an actual login screen! (Note however, that someone can create a phony login screen in DTML and bypass the entire Zope security model with a little "social engineering" anyway.) I've thought of that as well. Perhaps we'll have to accept that the new model just doesn't lend itself to the area of configurable user databases. I'm not sure which model you mean, here, but in any case I think the new security model is fine, *except* for the absence of a "root" user folder that is outside of Zope and is always present when you install Zope. Well, I'm hoping you'll take a look at my Collector suggestion for a new Zope feature. :) Specifically, extending the "access" file to allow other "top-level" users to exist besides the superuser, who have roles defined in the file. There are many ways this would be useful, not the least of which is to break the "you need to do that at the next level up" problem. (Others include a simplified process for getting your Zope site set up, since you then don't have to login as superuser and add a user folder, then log back in as somebody else.) If this were done, we could easily go to letting LoginManager objects be owned, since there'd always be a place "above" the LoginManager for the owner user to reside. Hmm... this sounds like a good idea, but now that the ownership problem has been resolved in a way I didn't expect, the issue that motivated your idea is gone. Maybe, maybe not. I think perhaps the most compelling argument from Digital Creations' viewpoint for having an expanded "access" file might be the simplification of the setup process for customers. And it would also make it easier to: 1) Phase out unownedness (user databases wouldn't need it) 2) Narrow the role of superuser (super-can-create hack can go away) 3) Do Zope virtual hosting and give somebody a Zope root and even superuser, while still being able to log in 4) Stop all the whining from people who want to know why superuser can't create or own objects any more. :) ___ 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] More comments on ZPatterns
At 02:29 PM 7/10/00 -0400, Shane Hathaway wrote: I decided to try out this idea. It turned out to be a cinch! It doesn't restrict the manage_* methods yet; I'll get to that after I get some feedback. Thoroughly untested except on my box; use at your own risk, etc. :-) http://www.zope.org/Members/hathawsh/ConfigurableInstances/ Looks pretty good. A suggestion, however. There isn't any need to do it as a patch to ObjectManager.py; you can implement this in a Product just fine. Just organize it like this: class ConfigurablesSheet: ... class Configurable(OFS.ObjectManager.ObjectManager): def _checkId(self, id, allow_dup=0): ... class ConfigurablesSheets: configurables = ConfigurablesSheet('configurables') class _ZClass_for_Configurable: propertysheets = ConfigurablesSheets() _zclass_ = Configurable manage_options=({'label': 'Configurable objects', 'action' : 'propertysheets/configurables/manage'},) Then all you have to do is context.registerZClass(_ZClass_for_Configurable), and anyone mixing in Configurable to their bases will now have the configurable stuff on your screen. (Btw, please don't take offense if you already knew how to do all this; doing mixins to alter the ZClass machinery itself is pretty deep Zen to most people, including me until just last week. I knew the theory before that, but only actually did some mixins like this late last week, working on some experimental stuff for PlugIns.) I think this may relate to an existing interest of yours regarding specification of interfaces and overriding them in instances; I'd be interested in hearing your comments regardless. The thing that's really missing is the interface that DatabaseConnector provides. It shows you all the methods you need to implement, and when you're done, the interface is ready to try out. This leads to a sense of completion, which in turn makes the user pleased to be using Zope/ZClasses/ZPatterns/etc. This can only be good. Yep, it would be nice to have such a thing. It's rather like PlugIns, except it's designed for single methods, rather than lists of collaborator objects. The other comment I have, now that I've seen your approach, is that it might be more flexible from a subclassing perspective, to use a __replaceable__ attribute. Here's how it could work: 1) Configurable._checkId() checks to see if the existing attribute to be replaced has a __replaceable__ = true attribute, or if it lacks a __replaceable__ attribute, it checks the objectmanager itself for a subobjectname__replaceable__ attribute. 2) The Configurables ZClass mixin UI would set/reset subobject.__replaceable__ on the list of names given (and in the case of attribute errors would set/reset class.subobjectname__replaceable__ The advantage to this approach is that if you create mixin classes that are designed to be added to Configurables, you don't have to go and re-check your configurability list; the replacability lives with the methods, not the class. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Expanded access file (was Re: LoginManager patchconsideredharmful)consideredharmful)
Jim, Phillip has an idea that could make life simpler for Zope newbies. This would be intended for the next major Zope release. "Phillip J. Eby" wrote: Well, I'm hoping you'll take a look at my Collector suggestion for a new Zope feature. :) Specifically, extending the "access" file to allow other "top-level" users to exist besides the superuser, who have roles defined in the file. There are many ways this would be useful, not the least of which is to break the "you need to do that at the next level up" problem. (Others include a simplified process for getting your Zope site set up, since you then don't have to login as superuser and add a user folder, then log back in as somebody else.) If this were done, we could easily go to letting LoginManager objects be owned, since there'd always be a place "above" the LoginManager for the owner user to reside. Hmm... this sounds like a good idea, but now that the ownership problem has been resolved in a way I didn't expect, the issue that motivated your idea is gone. Maybe, maybe not. I think perhaps the most compelling argument from Digital Creations' viewpoint for having an expanded "access" file might be the simplification of the setup process for customers. And it would also make it easier to: 1) Phase out unownedness (user databases wouldn't need it) 2) Narrow the role of superuser (super-can-create hack can go away) 3) Do Zope virtual hosting and give somebody a Zope root and even superuser, while still being able to log in 4) Stop all the whining from people who want to know why superuser can't create or own objects any more. :) As I understand it, the reason we needed to revoke capabilities from the superuser was to ensure there was someone who could be assigned ownership for every object. Do you think an expanded access file, which would include multiple users and role lists, would enable us to reduce the magnitude of the SuperCannotOwn dilemma? Perhaps during installation the user would set up two user accounts, a superuser and a normal user. 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] Re: Expanded access file (was Re: LoginManager patchconsideredharmful) consideredharmful)
FYI, I entered a Collector feature request for this over the weekend; I classified it as "somewhat important/future", IIRC. It mentions the "set up two accounts" concept you describe below, and I think there might be some other notes as well. At 05:07 PM 7/10/00 -0400, Shane Hathaway wrote: Jim, Phillip has an idea that could make life simpler for Zope newbies. This would be intended for the next major Zope release. As I understand it, the reason we needed to revoke capabilities from the superuser was to ensure there was someone who could be assigned ownership for every object. Do you think an expanded access file, which would include multiple users and role lists, would enable us to reduce the magnitude of the SuperCannotOwn dilemma? Perhaps during installation the user would set up two user accounts, a superuser and a normal user. ___ 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] NASTY error. Why?
Chris Withers writes: I'm trying to do a tree walk and copy with: dtml-in objectValues dtml-call "REQUEST['where'][-1].manage_addFolder(id)" Created dtml-var id in dtml-var "REQUEST['where'][-1].id"BR dtml-if "meta_type=='Folder'" dtml-call "REQUEST['where'].append(this())" dtml-var iterate dtml-call "REQUEST['where'].pop()" etc... but I get the following truly horrible error from the manage_addFolder any ideas? Chris Error Type: TypeError Error Value: read-only character buffer, Python Method "manage_addFolder" wants to have a string argument (that is what "read-only character buffer" usually means). Instead, it get a "Python Method". Explanation: "id" is often a method returning a string, not directly a string. Sometimes, i.e. for some classes, it is the string itself. You may use "_['id']". This is equivalent to "id()", if "id" is callable and to "id", if it is not. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] zope and UNIX permissions
Wetried to install zope using its tar.gz file and it created a lot of files with non-default users and with very permissive permissions on a linux box (like 777 permissions for many files). This is a HUGE security hole. We couldn't install the RPMs files on our webserver. Is there any decent zope source code distribution? thanks in advance K.
RE: [Zope-dev] zope and UNIX permissions
Which files? Know that if you untar as root, the files will be 'owned' by whoever tarred it up on our side. Untar it as a normal user. Reset the permissions of the ones you find too permissive. Then let us know so we can change the distribution. -Original Message- From: Leonardo Kenji Shikida [mailto:[EMAIL PROTECTED]] Sent: Monday, July 10, 2000 7:15 PM To: [EMAIL PROTECTED] Subject: [Zope-dev] zope and UNIX permissions We tried to install zope using its tar.gz file and it created a lot of files with non-default users and with very permissive permissions on a linux box (like 777 permissions for many files). This is a HUGE security hole. We couldn't install the RPMs files on our webserver. Is there any decent zope source code distribution? thanks in advance K. ___ 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] zope and UNIX permissions
On Mon, 10 Jul 2000, Chris McDonough wrote: Which files? Know that if you untar as root, the files will be 'owned' by whoever tarred it up on our side. Untar it as a normal user. Reset the permissions of the ones you find too permissive. Then let us know so we can change the distribution. On FreeBSD at least, this is not true. Unless you specify the 'p' (preserve) flag, untaring as root will leave all the files owned by root. I just untared the b4 source distrabution, and the file permissions all look good to me. The original poster mentioned an RPM and looking for a source release, so perhaps the problem is with the RPM. --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] zope and UNIX permissions
Using gnutar, untarring as the root user preserves ownership on expansion by default. Not sure if FreeBSD uses gnutar (I imagine not), but this is the case with gnutar under Linux. I think this is what happened to him... he said he could not use the RPM release and was working with the source distribution, so I don't think the problem is with the RPM. -Original Message- From: R. David Murray [mailto:[EMAIL PROTECTED]] Sent: Monday, July 10, 2000 10:55 PM To: Chris McDonough Cc: 'Leonardo Kenji Shikida'; [EMAIL PROTECTED] Subject: RE: [Zope-dev] zope and UNIX permissions On Mon, 10 Jul 2000, Chris McDonough wrote: Which files? Know that if you untar as root, the files will be 'owned' by whoever tarred it up on our side. Untar it as a normal user. Reset the permissions of the ones you find too permissive. Then let us know so we can change the distribution. On FreeBSD at least, this is not true. Unless you specify the 'p' (preserve) flag, untaring as root will leave all the files owned by root. I just untared the b4 source distrabution, and the file permissions all look good to me. The original poster mentioned an RPM and looking for a source release, so perhaps the problem is with the RPM. --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope] Sorting a list
RC Compaan writes: I have a list: mylist=[('R',31),('I',80),('A',80),('S',23),('E',35),('C',21)] I want to rebuild the list sorted from high to low on the sequence-item. When i call dtml-in mylist sort=sequence-item reverse the list gets sorted on the sequence-key not the sequence-item. As I understand the alphabetical characters are the sequence-keys and the float values are the sequence-items. Where do misunderstand? What you see is caused by the following code in "DocumentTemplate.DT_In.InClass.__init__": if has_key('sort'): self.sort=sort=args['sort'] if sort=='sequence-item': self.sort='' This means, "dtml-in sort=sequence-item" does not sort by "sequence-item" but by the complete tuple (key,item). I think, the special treatment of lists of pairs is altogether a slight misfeature. It would probably have been better to use a special "dict" attribute in analogy to the "mapping" attribute to call for the special pair interpretation. 'sequence-item' should then still be the complete item and 'sequence-value' the second pair component. Probably, it is too late by now to change this. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope] External Method not accepting CGI module
Dear All, I have this python module for uploading an image from a client to the server (which would be subsequently inserted into a MySQL database, which is still on the midst of being resolved). I''m trying to import this into Zope as an External MEthod. It's contents are as follows : import cgi form = cgi.FieldStorage() fileitem = form["userTABPIX1"] fname = tempfile.mktemp() fp=open(fname,'w') fp.write(fileitem.file.read()) fp.close() However, Zope generates this error : Zope has encountered an error while publishing this resource. Error Type : KeyError Error Value: userTABPIX1 Apparently, this piece of code is supposed to work. I grabbed it off the mailing list, and I've compared with the python references and tutorials. Is it because it's not meant to be used as an External MEthod? If so, can anybody suggest a way for me to upload files from the client to the server which will subsequently be inserted into a mySQL db? I posted another message in the archive earlier on which describes my previous attempts in inserting an image into the mySQL database from a form. Thanx, k.c. VCN - The Leader In Corporate Communication Solutions Visit our website at http://www.vcn.com.my. or http://www.vcnlinux.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] DTMLDocument content - html quoted or not
Aleksander Salwa schrieb am Fre, 07 Jul 2000: ... In mentioned method, to render document, I wrote: dtml-var this But this outputs html quoted text (so I see HTML and DTML tags in browser, instead of formatting and variables). Hmm, looks like a problem I had a few days ago. Maybe dtml-var "this.(_.None,_)" helps (untried ;-) -- Michael Gutmann M.A. [EMAIL PROTECTED] Universitaetsrechenzentrum Heinrich-Heine-Universitaet Duesseldorf ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Trouble compiling ZMySQLDA
Thanks for the help Ron. This almost works for me. I now have the product in zopes control panel, but it is broken. (see traceback below) Is this because my MySQL-Python RPM from your mail is not intalling properly ? Thanks Peter ZMySQLDA Import Traceback Traceback (innermost last): File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/OFS/Application.py", line 387, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py", line 106, in ? import sys, os, Globals, DA File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/DA.py", line 108, in ? from db import DB File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/db.py", line 106, in ? import _mysql, regex, sys ImportError: No module named _mysql -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ron Bickers Sent: Monday, 10 July 2000 1:17 PM To: Peter Marriott; [EMAIL PROTECTED] Subject: RE: [Zope] Trouble compiling ZMySQLDA The RPMs install in /usr/share/zope/lib/python/Products, where the Zope RPMs provided by Jeff Rush install the Products folder. If you're not using the Zope RPMs and have zope installed somewhere else, you can still use these RPMs and just make a symlink to your real Products folder. For example (if Zope is installed in /usr/local/zope): # cd /usr/local/zope/lib/python/Products # ln -s /usr/share/zope/lib/python/Products/ZMySQLDA ZMySQLDA Restart Zope and that should do it. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] -Original Message- From: Peter Marriott [mailto:[EMAIL PROTECTED]] Sent: Monday, July 10, 2000 12:58 AM To: Ron Bickers; [EMAIL PROTECTED] Subject: RE: [Zope] Trouble compiling ZMySQLDA I couldn't seem to get the RPMS to install, what kind of setup are they expecting? Does it matter where I have installed zope? (I am a linux learner so please forgive if I am not making sense) Thanks Peter. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Trouble compiling ZMySQLDA
Seems that because of how my Zope was installed had problems... I copied all files from /usr/lib/python1.5/site-packages/ to /usr/local/zope/lib/python/Products/ZmySQLDA and all was sweet. Thanks for your help Ron! Peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Marriott Sent: Monday, 10 July 2000 3:46 PM To: Ron Bickers; [EMAIL PROTECTED] Subject: RE: [Zope] Trouble compiling ZMySQLDA Thanks for the help Ron. This almost works for me. I now have the product in zopes control panel, but it is broken. (see traceback below) Is this because my MySQL-Python RPM from your mail is not intalling properly ? Thanks Peter ZMySQLDA Import Traceback Traceback (innermost last): File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/OFS/Application.py", line 387, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py", line 106, in ? import sys, os, Globals, DA File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/DA.py", line 108, in ? from db import DB File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/db.py", line 106, in ? import _mysql, regex, sys ImportError: No module named _mysql -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ron Bickers Sent: Monday, 10 July 2000 1:17 PM To: Peter Marriott; [EMAIL PROTECTED] Subject: RE: [Zope] Trouble compiling ZMySQLDA The RPMs install in /usr/share/zope/lib/python/Products, where the Zope RPMs provided by Jeff Rush install the Products folder. If you're not using the Zope RPMs and have zope installed somewhere else, you can still use these RPMs and just make a symlink to your real Products folder. For example (if Zope is installed in /usr/local/zope): # cd /usr/local/zope/lib/python/Products # ln -s /usr/share/zope/lib/python/Products/ZMySQLDA ZMySQLDA Restart Zope and that should do it. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] -Original Message- From: Peter Marriott [mailto:[EMAIL PROTECTED]] Sent: Monday, July 10, 2000 12:58 AM To: Ron Bickers; [EMAIL PROTECTED] Subject: RE: [Zope] Trouble compiling ZMySQLDA I couldn't seem to get the RPMS to install, what kind of setup are they expecting? Does it matter where I have installed zope? (I am a linux learner so please forgive if I am not making sense) Thanks Peter. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ 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] just html, help, help, help !!!
Hello, Can you help me ??? I have one page with a "form", in this page I have an "OnClick" who open a new page who have some informations and when I "Submit" (I think that I must use a form also in this page to send the informations to the first page), I want to receive the informations on the first page, in a input or something else ??? We are three people for find the answer but we don't find the way, this is why I call you... Thank you a lot ... Vincent. ___ 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 questions: Job_board Howto, ZCatalog, Squishdot
Meeting Maker Webmaster wrote: One last question ;-) I've seen in this mailing list that Squishdot will not work with Zope 2.2.0 until version 0.4.4... when is this version planed? I've tried to install Squisdot on the Zope 2.2.0b3 server and I get the same problem as with my "Job_Board" test... will one solution solve the other? 0.4.4 will land in a couple of weeks hopefully. One solution may well solve both problems, if you find it, please tell me ;-) 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] Date-bug in properties?
When I try to add a date-property and want to leave the Value-field empty i get the following error: Error Type: Invalid Date-Time String Error Value: When I write a date in the Value-field I can add the date. Is this a bug? Why cant I add a date with no default value? In several howtos they just add the date with no default value, so why cant 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 )
Re: [Zope] Date-bug in properties?
Ah I saw that was a known bug. Forget this post :) Peter Arvidsson skrev: When I try to add a date-property and want to leave the Value-field empty i get the following error: Error Type: Invalid Date-Time String Error Value: When I write a date in the Value-field I can add the date. Is this a bug? Why cant I add a date with no default value? In several howtos they just add the date with no default value, so why cant 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 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] Rendering Folderish ZClass Object
Hi, I have a ZClass based on Folder. Contained within this is a DTML Method, index_html. This is mapped to the 'View' view and renders the appropriate object contained in itself depending on soem logic. All, is well if I access the object through a URL, the page is rendered as expected. However, if I access the object with the following code: dtml-var testObject All I get is: MyClass instance at 8717b90 Why is this? Why does the normal rendering not take place? cheers, Chris PS: I notice that a normal folder object will behave identically, so the ZClass bti is probably irrelevent. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] How to set Proxy-Roles
Hi, i have a DTML-Method that adds a subfolder to a folder. I want to give anonymous users the permission, to add a Folder by using this DTML-Method. I added the Proxy-Role "Manager" to this DTML-Method, but anonymous users still can't use it - everytime they get a "You are not authorized to access manage_addFolder". Where is my mistake? Thanks Robert ___ 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] HEELLPP - Please !!!
Try using an argument other than 'login' Change it to something else because login could easily be a reserved keyword. To test this simply change it to xlogin or something similar. Let me know if that helps. -Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mario Premke Sent: 10 July 2000 13:58 To: [EMAIL PROTECTED] Subject: [Zope] HEELLPP - Please !!! Hi, I have the following ZSQL-Method: arguments : login - select user_passwd as real_password from users where users.user_login=dtml-sqlvar name=login type=string when I now press "change and test" and insert a valid login into the Login-field I get: Error, Missing Input: Missing input variable, login The database works just fine as do other ZSQL-Methods ... 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 maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Trouble compiling ZMySQLDA
Ron Bickers wrote: Actually, I just realized that what you're trying to compile is the MySQLdb that comes with the DA. The DA itself is written in Python, and doesn't need to be compiled. Aargh, if I had know this yesterday! Thanks. Also it was a little late yesterday when I started playing with ZMySQLDA, so I went to zope.org did a search on "mysql", followed the first big fat link "ZMySQLDA" and ended up with ZMySQLDA versions 1.1.3 and 1.1.4.. Installing version 1.2.0 isn't a problem at all. Ewald ___ 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] Wizards?
I am trying to create wizards but as usual I am running into problems.. To forward input to the next step I learned in the howto "Wizards made easy" that this was the way to do it: dtml-in "REQUEST.form.items()" input type="hidden" name="dtml-var sequence-key" value="dtml-var sequence-item" /dtml-in When I type that code in however I get the following error message: Error Type: TypeError Error Value: illegal argument type for built-in operation Is the howto wrong or did I do something wrong? Wizards are prebuilt but where do I change how wizards should react. For example where do I change the caption on the "next"-button or the "title"-output? Peter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] a product with external methods
Hi, 1st question: I'm currently creating a ZClass based product which includes some external methods. If I want to distribute this product, do I have to distribute my product AND my external methods for it to work correctly elsewhere, or just distributing the product is sufficient ? 2nd question about ZCatalog and Zope 2.1.6: When I instanciate a folderish ZClass of my own, I want to automatically create a ZCatalog instance, then I add the following line to MyZClass_add method: dtml-call "manage_addZCatalog('Catalog', 'My Catalog')" and when I create an instance of my class I've got the following NameError : !-- Traceback (innermost last): File /usr/local/zope/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/zope/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/zope/Zope-2.1.6/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: RoleManager) File /usr/local/zope/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/zope/Zope-2.1.6/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: MyZClass_add) File /usr/local/zope/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: MyZClass_add) File /usr/local/zope/Zope-2.1.6/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: MyZClass_add) File ./DT_String.py, line 504, in __call__ (Object: MyZClass_add) File /usr/local/zope/Zope-2.1.6/lib/python/DocumentTemplate/DT_With.py, line 148, in render (Object: MyZClass.createInObjectManager(REQUEST['id'], REQUEST)) File /usr/local/zope/Zope-2.1.6/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: manage_addZCatalog('Catalog', 'My Catalog')) (Info: manage_addZCatalog) File string, line 0, in ? NameError: (see above) -- If I don't call manage_addZCAtalog in my add method but instead add the ZCatalog from Zope management interface it works fine. I think I've called this method correctly according to the ZQR, so I can't understand why it doesn't work. I've searched on this list archives on egroups about "adding ZCatalog" or "add ZCatalog" and I've not found anything useful. then I've searched for manage_addZCatalog and I've applied the patch sent by Dieter Maurer on May 28th to ZCatalog.py and restarted Zope but with no luck. please could someone help me ? 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] GUF Problem
Richard Moon wrote: I don't think GUF works in its current release, or maybe the set-up instructions are incomplete. I used it before and it was ok but I tried the latest release and had the same problem as you. I reported it to GUF's author but didn't get a reply. I just added a SQL user database, and will try to make it run. I've reverted back to standard ACL folders for the moment. My problem is the little window with "Zope" in it, when the user tries to logon. If there was a way to customize it to anything I want, I stay with the standart ACL. I'm using GUF only because of the docLogin methot, that allows me to customize the login page. []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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] [Fwd: [Zope] GUF Problem]
One reply I get from Mario: Mario Premke wrote: I remember I had the same problem. In GUF's acl_user folder I gave the special_role the same permissions as the anonymus role. As far as I remember that did it ... -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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 alert! Frustration right off the bat...
Create your own image file. Use anything you would like. -- Pamela Crosby Technical Writer mailto:[EMAIL PROTECTED] Digital Creations http://www.digicool.com Publishers of Zope http://www.zope.com -Original Message- From: Bill Barnes [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 09, 2000 3:44 PM To: zope mail list Subject: Re: [Zope] Newbie alert! Frustration right off the bat... R. David Murray wrote: You should be able to use the management interface to delete the index_html document inside your existing ZAcme folder, and then recreate it according to the tutorial grin. Yep, that was it, thanks. Rob Running Debian 2.2 Well, yep and nope! My folder at root lists Control Panel QuickStart ZAcme acl users standard error message standard html footer standard html header Opening ZAcme does list News, Products, Research That does not agree with the tutorial layout. Maybe that is not significant so I proceed with Add Image. Now, pray tell, where is that .gif file. Thanks, Bill Barnes ___ 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] GUF Authentication Problems
Hi, I cannot authenticate users with the following method: dtml-in "sql_get_password(xlogin=username)" dtml-if "password==_['sequence-item'].real_password" dtml-return "_.int('1')" /dtml-if /dtml-in dtml-return "_.int('0')" The ZSQL-Method works as well as the former default method (user='jorge',passwd='secret') did. This above code comes from the Zope How-TO's: http://www.zope.org/Members/hippy/GUF_SQL_crypt_1_2 Any ideas will be appreciated as I have no idea any more what could be wrong... 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 )
Re: [Zope] Newbie: Build Object Names
Dieter, Thanks, that worked like a charm. I find I am really struggling trying to learn the syntax and variables for the various commands. Would an understanding of Python help me to understand the Zope commands better and is there good documentation for Python that does not expect the reader to have a large background knowledge? Terry Dieter Maurer wrote: Terry Babbey writes: I am trying to build my object names and it is not working. Here is my code done in three ways and only one way works. #1 dtml-var "ProgCode+'AR'" Use: dtml-var "_[ProgCode + 'AR']" Dieter -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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 with ZPoPyDA
Hello, Im trying to access a postres database from within zope. I have ZPoPyDA-0.5.tar.gz installed along with PoPy-1.2. The connection string Im using is something like: user=thierry host=myhost dbname=test port=5432 password=mypassword When I try to add a Z PoPy Database Connection with the above string, I get: Invalid connection string: user=thierry host=myhost dbname=test port=5432 password=mypassword 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: ElementWithAttributes) 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: addConnection) File /usr/local/zope/2.1.7/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: addConnection) File /usr/local/zope/2.1.7/lib/python/Products/ZPoPyDA/DA.py, line 55, in addConnection (Object: ElementWithAttributes) File /usr/local/zope/2.1.7/lib/python/Products/ZPoPyDA/DA.py, line 70, in __init__ (Object: RoleManager) File /usr/local/zope/2.1.7/lib/python/Products/ZPoPyDA/DA.py, line 140, in edit (Object: RoleManager) File /usr/local/zope/2.1.7/lib/python/Shared/DC/ZRDB/Connection.py, line 227, in connect (Object: RoleManager) File /usr/local/zope/2.1.7/lib/python/Products/ZPoPyDA/PoPy_db.py, line 54, in __init__ BadRequest: (see above) Any help would be appreciated. Thanks 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 )
Re: [Zope] data record exceeds transaction record (was C:\ProgramFiles\WebSite...)
On Fri, 7 Jul 2000, Jonathan DESP wrote: I'm getting a problem, I don't understand what it is, my friend and me didnot find the problem too. [] data record exceeds transaction record at 34224435 This may not be of any help, but I got this kind of error when I was trying to build a Zope site on a computer that had one of the bad Intel motherboards. I banged my head agaist the wall hard before I finally figured out that it was a hardware problem... --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] Testing For Filesize
I am trying to create a automated drop down list, and here is my code so far: form NAME="BOOGER" SELECT name="myList" dtml-in "objectValues(['DTML Document'])" OPTION value='dtml-var id'dtml-var title/OPTION /dtml-in /SELECT /form I would like to be more specific though and only list files of zero byte size. Is this possible? Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQLDA Won't build
Hi, I'm not sure if you are having the same problem, but when we built MySQLDA, I found that there are some lines in one of the configure files that need to be fixed. Did you save the compile log? (Sorry, but I cannot recall the exact file that has the problems), but there are three places where there is an in the middle of a line that is trying to act in the C like addressing, but there is no address there. A second problem we had, is that after fixing these lines this did not build on redhat but did fine under informix (???). we had to move the .so file by hand, and it works ok. I have been having trouble getting any of the various MySQL modules (either for zope or for python) to build on RedHat -- I'm growing increasingly impatient with redhat it seems to be getting more microsoftish with each new release. ciao! greg. Gregory Haley venaca.com Darin Lee wrote: Help, I cannot get the MySQL Database Adaptor to build. Error: gcc -shared _mysqlmodule.o -L/usr/local/lib/mysql -o _mysqlmodule.so Whoa, couldn't import _mysql: ./_mysqlmodule.so: undefined symbol: mysql_store_result Probably _mysqlmodule.so didn't compile correctly. Or your library paths may be bad. Check the FAQ. I checked the faq (also downloaded and compiled lastest versions - MySQL, Python, and Zope from source) - nada. I've set LD_LIBRARY_CONFIG, I've also edited the "Setup.in" file many, many times. No joy (My MySQL is in /usr/local). System is Redhat 6.1 - Intel... Any idea on what could be wrong?? Thanks, -Darin Lee ___ 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] GUF Problem
At 17:15 10/07/00 +0200, you wrote: Is it possible (and how) to use the standard ACL with a user-database behind it ??? Thanks Mario Well kind of, in the sense that you can check the user login using ACL in the normal way and then you can match AUTHENTICATED_USER against your user database so your database knows who it is. It means maintaining your users in two places (in the ACL folder and in the database), but it's a workaround until the GUF problems are ironed out or login manager is up and running (with docs on how to use it). I need this because I've got users inputting data via Zope and I need to have a user ID I can stamp their data with - so all I do is - select user_id from users where dtml-sqltest AUTHENTICATED_USER column=username type=string in an SQL-method where AUTHENTICATED_USER is defined as an argument. Seems to work OK ! that's what I'm doing until I (or someone else) finds out hot to get GUF working again. Richard Moon wrote: I don't think GUF works in its current release, or maybe the set-up instructions are incomplete. I used it before and it was ok but I tried the latest release and had the same problem as you. I reported it to GUF's author but didn't get a reply. I just added a SQL user database, and will try to make it run. I've reverted back to standard ACL folders for the moment. My problem is the little window with "Zope" in it, when the user tries to logon. If there was a way to customize it to anything I want, I stay with the standart ACL. I'm using GUF only because of the docLogin methot, that allows me to customize the login page. []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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 ) Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Trouble compiling ZMySQLDA
Hello Ewald, Here's a mailing list archive that may help you: http://zope.nipltd.com/public/lists/zope-archive.nsf/242bb7cc2b2c343d802568a b003585d4/041159ede9899734802568a700259726?OpenDocument It helped me with the same problem. Basically, It tells you how to make a few simple modifications to the MySQLmodule.c file that allow the file to be compiled. Hope It Helps... Eric. // -Original Message- // From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ewald // Wasscher // Sent: Sunday, July 09, 2000 4:54 PM // To: [EMAIL PROTECTED] // Subject: [Zope] Trouble compiling ZMySQLDA // // // Hello all, // // When I try to compile ZMySQLDA I get the following error messages after // typing make: // // [root@catv6216 src]# make // gcc -fPIC -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 // -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG_H -c // ./MySQLmodule.c // ./MySQLmodule.c: In function `pythonify_row': // ./MySQLmodule.c:238: warning: assignment from incompatible pointer type // ./MySQLmodule.c: In function `pythonify_res_fields': // ./MySQLmodule.c:384: invalid lvalue in unary `' // ./MySQLmodule.c: In function `STH_fetchdict': // ./MySQLmodule.c:1125: invalid lvalue in unary `' // ./MySQLmodule.c:1147: invalid lvalue in unary `' // make: *** [MySQLmodule.o] Error 1 // [root@catv6216 src]# // // I can't even read a single line of c so I have no idea what's wrong // exactly. // // FYI: // // OS: Immunix 6.2 (= RedHat 6.2 + stackguard) // Zope: 2.1.6 (compiled from Jeff Rush's source rpm, 2.2b3 doesn't work // either) // MySQL: 3.22.32 and 3.23.21 // Python MySQLdb: 2.0 2.1 // // Ewald Wasscher // // ___ // 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] Help with ZPoPyDA
Le Mon, Jul 10, 2000 at 10:49:27AM -0500, Nitesh Dhanjani à écrit: # Im trying to access a postres database from within zope. I have # ZPoPyDA-0.5.tar.gz installed along with PoPy-1.2. # # The connection string Im using is something like: # user=thierry host=myhost dbname=test port=5432 password=mypassword It's a example. Change with yours attributes. thierry by your user. myhost by your host (or localhost). test by your db name. mypassword by your db password. For create a DB - man createdb For create a user - man createuser Docs at /usr/doc/postgresql-xxx/ -- (°- Sébastien Douche [EMAIL PROTECTED] //\ IDEALX www.IDEALX.com www.IDEALX.org v_/_ Ingénierie Open Source ___ 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] automatic link adjustment
Howdy Zopistas out there! I just ran into some kind of administrative problem: my students are not so willing anymore when it comes to changing links for the third revision of our website. There are about 200 links to change manually and they have my full sympathy. Apart from that this process is quite error-prone and always needs a lot of testing. Is it possible to have automatic link adjustment in Zope if you change an objects name? I mean like in Dreamweaver or whatever website management programm so that it would ask whether to adjust the referring links if you change a page's name? I know we could do the management partly with Dreamweaver and put the files via ftp but whatever sends cleartext passwords is not an option. So ftp is out. Any other way? --Ragnar ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Mirroring to IIS
Hello all, I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Thank you, Jake LeBeau [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] ANNOUNCE: Zope 2.2.0 beta 4 released
Hi all, Zope 2.2.0 beta 4 has been released - you can download it from Zope.org: http://www.zope.org/Products/Zope/2.2.0b4/ This release includes fixes for a number of bugs found in the beta cycle, including a fix for the recent database packing issue. It also contains updated online help and API documentation. I expect this to be the last beta before 2.2 final. For more information, see the CHANGES.txt file for the release: http://www.zope.org/Products/Zope/2.2.0b4/CHANGES.txt If you are still using a 2.1.x version of Zope, be sure to see the document upgrading to Zope 2.2: http://www.zope.org/Products/Zope/2.2.0b4/upgrading_to_220 for information on the recent changes to the Zope security model and other upgrade information. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.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] automatic link adjustment
Hi Ragnar ! Ragnar Beer wrote: I just ran into some kind of administrative problem: my students are not so willing anymore when it comes to changing links for the third revision of our website. There are about 200 links to change manually and they have my full sympathy. Apart from that this process is quite error-prone and always needs a lot of testing. Is it possible to have automatic link adjustment in Zope if you change an objects name? I mean like in Dreamweaver or whatever website management programm so that it would ask whether to adjust the referring links if you change a page's name? I know we could do the management partly with Dreamweaver and put the files via ftp but whatever sends cleartext passwords is not an option. So ftp is out. Any other way? The Zope way would be to consider this beforehand by splitting the URLs into a part that may change over time and a part that is more constant. The changing part of your URL should then be a variable somewhere on top of the hierarchy, and the complete URL can then be combined with the constant part further down the hierarchy. Perhaps you can motivate your students by telling them that they only have to do this one more time ;-) Best regards, Maik Röder ___ 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] Mirroring to IIS
Hi Jake ! Jake LeBeau wrote: I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Try using a mirror tool like w3mir. Folders like http://localhost/w3mir/ will be mirrored to a folder: w3mir/ and an index.html file inside: w3mir/index.html Hope this helps. Regards, Maik Röder -- "The computing future is based on "cyberbodies" - self-contained, neatly-ordered, beautifully-laid-out collections of information, like immaculate giant gardens." The second coming - A manifesto. David Gelernter http://www.edge.org/3rd_culture/gelernter/gelernter_p1.html ___ 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] Mirroring to IIS
I did a similar thing and when I mirrored it to IIS as static files I changed the filename by adding .html You can fix the header to always add the correct content type (RESPONSE.setHeader('Content-Type', 'text/html')) - Original Message - From: "Jake LeBeau" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 10:47 AM Subject: [Zope] Mirroring to IIS Hello all, I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Thank you, Jake LeBeau [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help with ZPoPyDA
On Mon, 10 Jul 2000, Sebastien Douche wrote: Le Mon, Jul 10, 2000 at 10:49:27AM -0500, Nitesh Dhanjani à écrit: # Im trying to access a postres database from within zope. I have # ZPoPyDA-0.5.tar.gz installed along with PoPy-1.2. # # The connection string Im using is something like: # user=thierry host=myhost dbname=test port=5432 password=mypassword It's a example. Change with yours attributes. thierry by your user. myhost by your host (or localhost). test by your db name. mypassword by your db password. Yes I know its an example, but did not want to post host+user info to the entire mailing list. I cannot seem to connect to the postgres database using psql, and get: Failed to authenticate client as Postgres user 'bob' using unknown authentication type: be_recvauth: unrecognized message type: 131072 so its probably not a problem with ZPoPyDA. If anyone has come across this error or might know of a solution, please let me know. Thanks 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 )
Re: [Zope] Mirroring to IIS
Oops of course you are mirroring to a static file that setting a header will do no good. Damn need more tea to wake me up. - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 11:40 AM Subject: Re: [Zope] Mirroring to IIS I did a similar thing and when I mirrored it to IIS as static files I changed the filename by adding .html You can fix the header to always add the correct content type (RESPONSE.setHeader('Content-Type', 'text/html')) - Original Message - From: "Jake LeBeau" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 10:47 AM Subject: [Zope] Mirroring to IIS Hello all, I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Thank you, Jake LeBeau [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help with ZPoPyDA
On Mon, Jul 10, 2000 at 01:42:48PM -0500, Nitesh Dhanjani wrote: On Mon, 10 Jul 2000, Sebastien Douche wrote: Le Mon, Jul 10, 2000 at 10:49:27AM -0500, Nitesh Dhanjani à écrit: # Im trying to access a postres database from within zope. I have # ZPoPyDA-0.5.tar.gz installed along with PoPy-1.2. # # The connection string Im using is something like: # user=thierry host=myhost dbname=test port=5432 password=mypassword Yes I know its an example, but did not want to post host+user info to the entire mailing list. I cannot seem to connect to the postgres database using psql, and get: Failed to authenticate client as Postgres user 'bob' using unknown authentication type: be_recvauth: unrecognized message type: 131072 so its probably not a problem with ZPoPyDA. If anyone has come across this error or might know of a solution, please let me know. Could you please post a bit more information: platform postgres is running on: postgres version: are internet domain sockets enabled on postgres: was PoPy compiled locally: are multiple versions of postgres residing on your db host: Jim Thanks 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 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] Document Title
I am trying to get a document title to print out and am having problems. As part of my web page I would like to display the title of a document, and the document id is stored in a variable. But Zope is interpretting the information in the variable as a string and not as a document id. Any ideas, Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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] Document Title
Terry Babbey wrote: I am trying to get a document title to print out and am having problems. As part of my web page I would like to display the title of a document, and the document id is stored in a variable. But Zope is interpretting the information in the variable as a string and not as a document id. I guess I'm confused. You don't use id for the ID? As in, dtml-var id doesn't work properly? There's also dtml-var title, dtml-var title_or_id, dtml-var document_title ... does that help? -- ethan mindlace fremen Zopatista Community Liason Abnigate 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] Re: low level HTML in Zope
"Henny van der Linde" [EMAIL PROTECTED] wrote: ...Zope forces you often to go to nitty gritty details of HTML programming. I think that's a good thing (for me). GUI tools tend to make you very lazy and often produce horrible HTML (for example Frontpage). Today's best WYSIWYG editors produce excellent HTML, including Dreamweaver and Allaire Homesite. (There should be a rule that nothing is every usefully compared to the hideous Frontpage.) Zope's text box interfaces do encourage you to mess with low level HTML, but there is no help or verification that you actually know what you're doing. Learning raw HTML is fun and can be useful, but if you program that way, you should always follow up with a *validator* like CSE HTML Validator or a recent build of Weblint. You will find errors! And errors do matter! ___ 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] product import error - please help
Eagan hills wrote: All, I am working on a new installation of Zope under Red Hat 6.3. When trying to import any product (Portal Toolkit, Squishdot, KM news etc.), I get an error - internal server error (500). It seems as if the page isnt there. There is an import directory under the Zope root directory. Any ideas or suggestions will be greatly appreciated. You need to be in Control_Panel/Products when you import products. Does that answer your question? -- 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 )
Re: [Zope] Mirroring to IIS
LOL Good catch, I was just about to e-mail more questions ;-) I've been banging my head on it for most of the day, and I think what it comes down to is - why does netscape have no problem displaying pages from ZServer that have no file extension, and yet try to save all files from IIS that don't have a file extension? I think it is because ZServer correctly sends the appropriate MIME type along with each file. IIS doesn't. Apparently IIS sends files without extensions as an "application/octet-stream" content-type. I've tried changing this in IIS by changing the ".*" MIME mapping, but to no avail. I'm afraid I'm getting far afield from the topic of Zope and need to address this to some IIS list or other :-P Thanks for your help, though yours, Jake [EMAIL PROTECTED] "Andy McKay" [EMAIL PROTECTED] 07/10/00 01:13PM Oops of course you are mirroring to a static file that setting a header will do no good. Damn need more tea to wake me up. - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 11:40 AM Subject: Re: [Zope] Mirroring to IIS I did a similar thing and when I mirrored it to IIS as static files I changed the filename by adding .html You can fix the header to always add the correct content type (RESPONSE.setHeader('Content-Type', 'text/html')) - Original Message - From: "Jake LeBeau" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 10:47 AM Subject: [Zope] Mirroring to IIS Hello all, I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Thank you, Jake LeBeau [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope 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] Mirroring to IIS
Hi Maik, I've been trying to use the ZMirror product and wget with varying degrees of success. See my response to Andy McKay for a description of where I am now. Of course, if I was a real Zopista, instead of a newbie, I would rewrite the ZMirror product to assign file extensions to its output, right? Thanks for your help, Jake [EMAIL PROTECTED] Maik Roeder [EMAIL PROTECTED] 07/10/00 12:40PM Hi Jake ! Jake LeBeau wrote: I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Try using a mirror tool like w3mir. Folders like http://localhost/w3mir/ will be mirrored to a folder: w3mir/ and an index.html file inside: w3mir/index.html Hope this helps. Regards, Maik Röder -- "The computing future is based on "cyberbodies" - self-contained, neatly-ordered, beautifully-laid-out collections of information, like immaculate giant gardens." The second coming - A manifesto. David Gelernter http://www.edge.org/3rd_culture/gelernter/gelernter_p1.html ___ 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] FSSession used in Python???
On Fri, 7 Jul 2000, Dan Narkiewicz wrote: inside my own python written Zope product... Any help would be.. well... helpful.. I am not sure if it is a good idea to use a Product in the manner you describe but in any case: --- a class definition --- def FStest(self): """fssession test""" self.a = FSSession() error appears here FSSession needs to be initialized with a cookie name, (whatever one wants to call the cookie that will store the session id). self.a=FSSession('Danssession') Still it might not work if FSSession cannot access REQUEST etc. Let me know. Pavlos ___ 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] Customising the calling of the _add method for a product
I have a TimeSheet product which is currently utilising the suggestions from one of the howtos on zope.org, to make the handling of errors a little smarter. Subsequently my addForm code checks to see if any errors were detected and, if not, tries to go to the usual _add method. But this fails. The code below shows what I currently have. If I can just call this _add method I am finished. dtml-if "I_Error==1" dtml-var TimeSheet_addForm_include dtml-else dtml-call "TimeSheet_add(_,_.None)" /dtml-if As always, any help greatfully received Ian ___ 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: low level HTML in Zope
Hi folks, I wholeheartedly agree that one should learn handcoded html, if only in order to be able to clean up what the html editors do that you want to customize. I have found that it is possible to write very complex files with code warrior or dreamweaver. From the zope interface, you can import a dtml document, and pull up the edited file into zope. When you try to submit the 'change' command, the zope parser will throw out any errors, etc. ciao! greg. Gregory Haley venaca.com Anser wrote: "Henny van der Linde" [EMAIL PROTECTED] wrote: ...Zope forces you often to go to nitty gritty details of HTML programming. I think that's a good thing (for me). GUI tools tend to make you very lazy and often produce horrible HTML (for example Frontpage). Today's best WYSIWYG editors produce excellent HTML, including Dreamweaver and Allaire Homesite. (There should be a rule that nothing is every usefully compared to the hideous Frontpage.) Zope's text box interfaces do encourage you to mess with low level HTML, but there is no help or verification that you actually know what you're doing. Learning raw HTML is fun and can be useful, but if you program that way, you should always follow up with a *validator* like CSE HTML Validator or a recent build of Weblint. You will find errors! And errors do matter! ___ 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] DTML?
Brian Lloyd wrote: snip id is sometimes a method (not always though ;-) This is one of the things on my List Of Evil Things that should be changed one day in Zope3K :) RANT type="angry,frustrated" How about the nasty hacky mess that is DTML? Some priceless artifacts that need to go: dtml-var "someMethod(_, _.None, myparam)" dtml-call "REQUEST.set('keyname','value')" dtml-let x="'hello out there'" dtml-var "_[REQUEST['myDoc']]"What is this supposed to do?! dtml-var "PARENTS[-1].folder.getitem(_.getitem('id',1))" Not to mention the horribleness that is dtml-in and dtml-with. There's dtml-tree too, but hopefully I'm going to land very hard on that tomorrow and beat it into something like a decent shape ;-) While I'm at it, how about some docs for the manage_* methods in the interfaces Wiki? /RANT Okay, seriously, DTML is really hurting Zope's chances with a lot of people/companies. DTML should be easier than, say, creating a Form in Lotus Notes or writing a component in Mason. That requries, IMHO: 1. Clear definition of when it should be used. 2. A clean, concise syntax (like Python, DTML is more like Perl right now ;-) 3. Good documentation (much easier to do if 1 and 2 are met...) I also think having Python Methods ship with Zope would really help... There are niggles (like the rediculous id problem) which you can live with, but doing anything other than the really mundane in DTML means extreme hair loss right now, which is not good. I wonder how many other people would agree with me: nevermind ZEO, or the PTK, ZPatterns or any new fancy functionality. Can we at least have a decent template language that doesn't confuse the hell out of newbies and oldbies alike... cheers, Chris (Who just spent 1/2 hour figuring out how to do a multi-language site in Zope, and now after 6hrs of trying has given up doing a recursive tree copy to get the old site into the new structure with a DTML method or two and is resorting to ugly hacky external methods because Python Methods arent' around/stable) PS: Zope: yes it makes the hard things very easy, but it makes the easy things very hard, so it all balances out nicely... ;-) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DTML?
Chris Withers wrote: Okay, seriously, DTML is really hurting Zope's chances with a lot of people/companies. DTML should be easier than, say, creating a Form in Lotus Notes or writing a component in Mason. That requries, IMHO: 1. Clear definition of when it should be used. 2. A clean, concise syntax (like Python, DTML is more like Perl right now ;-) The idea of making an XML compliant DTML has been tossed around before. It would remove the difference between dtml-var x and dtml-var "x", since XML allows neither syntax. :-) 3. Good documentation (much easier to do if 1 and 2 are met...) How about a "namespace inspector"? It could provide an easy way to find out what methods are available and the what the calling conventions are (since it would interface with the help system), and it could be automatically invoked when exceptions occur (under certain conditions), making it a Zope debugging tool. I also think having Python Methods ship with Zope would really help... I'm working on enhancing Python Methods right now. I'm close to getting them properly interfaced with DTML namespaces, so that DTML can invoke Python Methods using simpler DTML syntax. There are niggles (like the rediculous id problem) which you can live with, but doing anything other than the really mundane in DTML means extreme hair loss right now, which is not good. A curious paradox: newbies need it to be easier, but experienced users need consistency. I wonder how many other people would agree with me: nevermind ZEO, or the PTK, ZPatterns or any new fancy functionality. Can we at least have a decent template language that doesn't confuse the hell out of newbies and oldbies alike... It doesn't confuse Jim! ;-) 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] C:\Program Files\WebSiteC:\Program Files\WebSite\bin\python.exe
Jonathan DESP writes: I'm getting a problem, I don't understand what it is, my friend and me didnot find the problem too. raise CorruptedTransactionError, message ZODB.FileStorage.CorruptedTransactionError: C:\Program Files\WebSite/var/Data.fs data record exceeds transaction record at 34224435 C:\Program Files\WebSite Your "var/Data.fs" is corrupted. You could use the "tranalyser" product (- zope.org) to analyse your file and fix it. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DTML?
Hi! Brian Lloyd wrote: snip id is sometimes a method (not always though ;-) This is one of the things on my List Of Evil Things that should be changed one day in Zope3K :) RANT type="angry,frustrated" How about the nasty hacky mess that is DTML? Some priceless artifacts that need to go: dtml-var "someMethod(_, _.None, myparam)" dtml-call "REQUEST.set('keyname','value')" dtml-let x="'hello out there'" dtml-var "_[REQUEST['myDoc']]"What is this supposed to do?! dtml-var "PARENTS[-1].folder.getitem(_.getitem('id',1))" and maybe dtml-var "REQUEST[_['sequence-item']]" Not to mention the horribleness that is dtml-in and dtml-with. There's dtml-tree too, but hopefully I'm going to land very hard on that tomorrow and beat it into something like a decent shape ;-) While I'm at it, how about some docs for the manage_* methods in the interfaces Wiki? /RANT Okay, seriously, DTML is really hurting Zope's chances with a lot of people/companies. DTML should be easier than, say, creating a Form in Lotus Notes or writing a component in Mason. That requries, IMHO: 1. Clear definition of when it should be used. 2. A clean, concise syntax (like Python, DTML is more like Perl right now ;-) 3. Good documentation (much easier to do if 1 and 2 are met...) I also think having Python Methods ship with Zope would really help... Actually I also like it more to code stuff in Python. It's so much easier than to figure out how to do it in DTML. Basically what I like in Zope is the environment you also have in Python Products, like Acquisition. This is quite handy. That's why I try to do most stuff in Python Products then in DTML. But actually this is not one of the main things which were thought about a lot as it's still not that easy to use Products as ZClasses (and be it only the managing of Products.. You might want to have different locations for different products etc. ) And another thing I don't like about DTML is the mixture between code and layout. IMHO this is a bad thing. This is also the reason why I switched from PHP to Python some time ago.. What I would think as more useful is to provide some custom tags by the website developer which the website designer can then use. These should be abstract and clear in meaning. The actual implementating of these tags could then be done separately in maybe Python.. (we had this before.. maybe the XML stuff can help here). The advantage would also be that you can provide quite powerful tags like an easy handling of database forms, etc. (I did this some time ago with pure python.. developing with it is quite fast. One day and you have your basic database frontend with some basic CMS stuff.) But nevertheless for basic tasks a good template language is neccessary. And I agree with Chris that things like the above mentioned make it not that usable/readable. There are niggles (like the rediculous id problem) which you can live with, but doing anything other than the really mundane in DTML means extreme hair loss right now, which is not good. I wonder how many other people would agree with me: nevermind ZEO, or the PTK, ZPatterns or any new fancy functionality. Can we at least have a decent template language that doesn't confuse the hell out of newbies and oldbies alike... yep. PS: Zope: yes it makes the hard things very easy, but it makes the easy things very hard, so it all balances out nicely... ;-) :) -- christian ___ 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] ZWiki/Structured Text formatting surprise
Jim Fulton wrote: I suggest that, since this appeared in a code snippit to begin with, it should have been written as: blah blah '(_.None,_,foo)' blah blah I don't format my code like that ;-) Note that the StructuredText underlining feature is widely considered a missfeature and probably won't be supported in StructuredTextNG. Hmm, it could be useful though... I'd prefer to see a generic way of escaping structured text formatting. Maybe this is something for StructuredTextNG? Maybe. I'd really prefer that this not be necessary. I think escapign is always going to be necessary for something like this... ;-) If you do, please suggest an escaping syntax. Please think hard to come up with an escaping syntax that I don't hate. ;) How about extending ! beyond just escaping WikiNames? ! escapes structured text if it directly precedes a formatting character. !! actually puts a ! if it does indeed need to proceed a formatting character. cheers, Chris PS: Off to the wiki now ;-) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help with ZPoPyDA
On Mon, 10 Jul 2000 [EMAIL PROTECTED] wrote: On Mon, Jul 10, 2000 at 01:42:48PM -0500, Nitesh Dhanjani wrote: On Mon, 10 Jul 2000, Sebastien Douche wrote: Le Mon, Jul 10, 2000 at 10:49:27AM -0500, Nitesh Dhanjani à écrit: # Im trying to access a postres database from within zope. I have # ZPoPyDA-0.5.tar.gz installed along with PoPy-1.2. # # The connection string Im using is something like: # user=thierry host=myhost dbname=test port=5432 password=mypassword Yes I know its an example, but did not want to post host+user info to the entire mailing list. I cannot seem to connect to the postgres database using psql, and get: Failed to authenticate client as Postgres user 'bob' using unknown authentication type: be_recvauth: unrecognized message type: 131072 so its probably not a problem with ZPoPyDA. If anyone has come across this error or might know of a solution, please let me know. Could you please post a bit more information: platform postgres is running on: SunOS 5.6 Generic_105181-19 sun4m sparc SUNW,SPARCstation-20 Client (zope and psql) running on Linux 2.2.16 i686 postgres version: The person who installed postgres on the sparc machine isnt around anymore, im still trying to figure this out. The postmaster or postres executable do not have a "-v" or "-V" option that spits out the version. The client side psql is 6.5.3 are internet domain sockets enabled on postgres: I usually startup postgres like this "postmaster ", and was told to start it up with the -i switch. However postmaster doesnt seem to accept that switch: % postmaster -h usage: postmaster [options..] -a authsys do/do not permit use of an authentication system -B nbufsset number of shared buffers -b backend use a specific backend server executable -d [1|2|3] set debugging level -D datadir set data directory -m start up multiplexing backends -n don't reinitialize shared memory after abnormal exit -o option pass 'option' to each backend servers -p port specify port for postmaster to listen on -S silent mode (disassociate from tty) -s send SIGSTOP to all backend servers if one dies was PoPy compiled locally: yes, but this shouldnt matter, all im trying to do now is connect to a postgres database using psql. are multiple versions of postgres residing on your db host: nope thanks! 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 )
Re: [Zope] DTML?
Shane Hathaway wrote: The idea of making an XML compliant DTML has been tossed around before. It would remove the difference between dtml-var x and dtml-var "x", since XML allows neither syntax. :-) I'm not too hot on XML compliancy, but if it makes the problems I mentioned go away, then great :-) 3. Good documentation (much easier to do if 1 and 2 are met...) How about a "namespace inspector"? It could provide an easy way to find out what methods are available and the what the calling conventions are (since it would interface with the help system), and it could be automatically invoked when exceptions occur (under certain conditions), making it a Zope debugging tool. Sounds interesting but it's never going to beat a decent paper reference with examples... I'm working on enhancing Python Methods right now. I'm close to getting them properly interfaced with DTML namespaces, so that DTML can invoke Python Methods using simpler DTML syntax. Hmmm, how about just sorting out the problems: dtml-var and dtml-call dtml-var "x(_,_.None,arg1=x,arg2='y',arg3=3)" html_quote should really be: dtml-var x arg1=x arg2='y' arg3=3 html_quote ...IMNSHO ;-) A curious paradox: newbies need it to be easier, but experienced users need consistency. I don't see a paradox, these two are both solved by sorting out the same problems. It doesn't confuse Jim! ;-) dtml-call "REQUEST.set('id','answer1')" dtml-if "_[_[id]]=='funny'" So lobotomize Jim, then he'll know what it's like for the rest of us! :P dtml-else Yes, but if Jim is the only person who understands it, then no-one else will be able to use it, DC will have no customers and we'll all be building sites using CORBA, beans and otehr 'things' /dtml-if Thanks for the comments though, Ethan metnioned this as a project for dev.zope.org. I'm really up for that, would you be able to help out? cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help with ZPoPyDA
On Mon, Jul 10, 2000 at 05:39:27PM -0500, Nitesh Dhanjani wrote: On Mon, 10 Jul 2000 [EMAIL PROTECTED] wrote: On Mon, Jul 10, 2000 at 01:42:48PM -0500, Nitesh Dhanjani wrote: On Mon, 10 Jul 2000, Sebastien Douche wrote: Le Mon, Jul 10, 2000 at 10:49:27AM -0500, Nitesh Dhanjani à écrit: # Im trying to access a postres database from within zope. I have # ZPoPyDA-0.5.tar.gz installed along with PoPy-1.2. # # The connection string Im using is something like: # user=thierry host=myhost dbname=test port=5432 password=mypassword Yes I know its an example, but did not want to post host+user info to the entire mailing list. I cannot seem to connect to the postgres database using psql, and get: Failed to authenticate client as Postgres user 'bob' using unknown authentication type: be_recvauth: unrecognized message type: 131072 so its probably not a problem with ZPoPyDA. If anyone has come across this error or might know of a solution, please let me know. Could you please post a bit more information: platform postgres is running on: SunOS 5.6 Generic_105181-19 sun4m sparc SUNW,SPARCstation-20 Client (zope and psql) running on Linux 2.2.16 i686 postgres version: The person who installed postgres on the sparc machine isnt around anymore, im still trying to figure this out. The postmaster or postres executable do not have a "-v" or "-V" option that spits out the version. The client side psql is 6.5.3 Can psql on the linux connect to the postmaster on the sparc? (If I am right about the postmaster supporting only unix domain sockets, it should not.) are internet domain sockets enabled on postgres: I usually startup postgres like this "postmaster ", and was told to start it up with the -i switch. However postmaster doesnt seem to accept that switch: % postmaster -h usage: postmaster [options..] -a authsys do/do not permit use of an authentication system -B nbufsset number of shared buffers -b backend use a specific backend server executable -d [1|2|3] set debugging level -D datadir set data directory -m start up multiplexing backends -n don't reinitialize shared memory after abnormal exit -o option pass 'option' to each backend servers -p port specify port for postmaster to listen on -S silent mode (disassociate from tty) -s send SIGSTOP to all backend servers if one dies OK, you are dead in the water at this point...you can use only Unix domain sockets and PoPy needs internet domain sockets. (Unix domain sockets can only talk when both client and server are on the same machine.) was PoPy compiled locally: yes, but this shouldnt matter, all im trying to do now is connect to a postgres database using psql. It does matter for this reason: libpq changed between the 6.3 series and the 6.5 series. A client compiled against a newer libpq cannot connect to a postmaster compiled against the older libpq. I know that the version distributed by mixadlive.com was compiled with the new libpq. are multiple versions of postgres residing on your db host: nope My best guess: you need to build new postgres on both machines. For locking performance, you certainly want a more recent version of postgres, anyway! The version you have almost certainly does table level locking. You are going to have to rebuild the sparc's copy. And dump and restore may get to be 'interesting'. thanks! 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 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] Mirroring to IIS
:) I actually rewrote a *ahem* Perl script to do it. - Original Message - From: "Jake LeBeau" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 1:45 PM Subject: Re: [Zope] Mirroring to IIS Hi Maik, I've been trying to use the ZMirror product and wget with varying degrees of success. See my response to Andy McKay for a description of where I am now. Of course, if I was a real Zopista, instead of a newbie, I would rewrite the ZMirror product to assign file extensions to its output, right? Thanks for your help, Jake [EMAIL PROTECTED] Maik Roeder [EMAIL PROTECTED] 07/10/00 12:40PM Hi Jake ! Jake LeBeau wrote: I'm attempting to mirror our Zope site to IIS 5.0 on a W2K Server, and am having problems with Netscape Navigator. Because the files have no file extension, Netscape keeps trying to download and save the files to disk, rather than displaying the content as HTML. I've tried several ways of specifying that the MIME content type header coming from the server is "text/html", but nothing alters the behavior of Netscape. Is there anyone else out there who may have had experience with this and would be willing to help? Any advice would be appreciated. Try using a mirror tool like w3mir. Folders like http://localhost/w3mir/ will be mirrored to a folder: w3mir/ and an index.html file inside: w3mir/index.html Hope this helps. Regards, Maik Röder -- "The computing future is based on "cyberbodies" - self-contained, neatly-ordered, beautifully-laid-out collections of information, like immaculate giant gardens." The second coming - A manifesto. David Gelernter http://www.edge.org/3rd_culture/gelernter/gelernter_p1.html ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] SV: [Zope] Document Title
You must be thinking of this: dtml-var "index_html.title" - Original Message - From: Terry Babbey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 10, 2000 9:04 PM Subject: [Zope] Document Title I am trying to get a document title to print out and am having problems. As part of my web page I would like to display the title of a document, and the document id is stored in a variable. But Zope is interpretting the information in the variable as a string and not as a document id. Any ideas, Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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] DTML?
On Mon, 10 Jul 2000, Chris Withers wrote: (Who just spent 1/2 hour figuring out how to do a multi-language site in Zope, and now after 6hrs of trying has given up doing a recursive tree copy to get the old site into the new structure with a DTML method or two and is resorting to ugly hacky external methods because Python Methods arent' around/stable) This probably isn't what you want to hear, but doing it in Python rather than DTML was probably the Right Choice to start with. A tree copy is a programming task, not a presentation task, and DTML is (supposed to be grin) for presentation not programming. Which doesn't mitigate against any of your comments about DTML being in poor shape... --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 )
RE: [Zope] Adding comments to documents like in ACS ...
This is something I've wanted to see for a long time too. The Portal Toolkit (http://www.zope.org/Products/PTK) evidently has a "discussable" mixin class that allows users to add comments to documents. You may want to check it out. This feature should probably be abstracted out of the portal toolkit and made more generally available. I'd really like to see a "commentable document" product based on an atomic mixin class that we could reuse on Zope.org for how-tos, news items, etc. I really like ACS' "bboard" system, that's the kind of functionality I think these objects should provide. I wish I had time to write this. -Original Message- From: Ramarao Kanneganti [mailto:[EMAIL PROTECTED]] Sent: Monday, July 10, 2000 9:36 PM To: [EMAIL PROTECTED] Subject: [Zope] Adding comments to documents like in ACS ... Hi, I am a long time ACS (Arsdigta Community System) user. I am checking out Zope recently and am impressed with its management Interface. One thing that I miss from Zope is the ability to add comments to existing documents by all the readers of the document. Does anybody know a product that does it? Or, can one write one and pass it on to me:-)? Since I do not read this high volume list regularly, can you please CC me if you have any suggestions? Thanks, Rama ___ 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] MessageDialog
The MessageDialog is cool, but a little sparse, has anyone tried overriding it with their own or fiddling with it? Im looking at including standard header and footer in it and not gotten very far. Thanks. -- Andy McKay, Developer, ActiveState http://www.ActiveState.com Programming for the People ___ 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] exceptions.ImportError
Title: Blank Hi, I read all the past message in your mailing lists with the keyword:exceptions.ImportError in. I'm getting that problem:exceptions.ImportError Anyone is able to help me ? You know a way to fix it ? a patch or something ? Just email me at mailto:[EMAIL PROTECTED]
[Zope] trailing whitespace optimization
I'm noticing that our file sizes could be reduced by 10% or more by trimming trailing whitespace. Is there a way to get Zope to do that automatically? It would be best if Zope did it whenever a method was saved. Thanks in advance, -Paul __ 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] trailing whitespace optimization
On Tue, 11 Jul 2000, Paul Abrams wrote: I'm noticing that our file sizes could be reduced by 10% or more by trimming trailing whitespace. Is there a way to get Zope to do that automatically? It would be best if Zope did it whenever a method was saved. Agreed. I have found that reformatting can save much space. However, sometimes you might actually WANT those spaces there. I know, HTML is supposed to ignore whitespace, but there could be various reasons you would want to keep trailing spaces. Really, your best solution is to stop being to slack, and remove the spaces yourself! (o8 Thanks in advance, -Paul Have a better one, Curtis Maloney. dtml-var standard_work_disclaimer ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sorting a list
RC Compaan writes: I have a list: mylist=[('R',31),('I',80),('A',80),('S',23),('E',35),('C',21)] I want to rebuild the list sorted from high to low on the sequence-item. When i call dtml-in mylist sort=sequence-item reverse the list gets sorted on the sequence-key not the sequence-item. As I understand the alphabetical characters are the sequence-keys and the float values are the sequence-items. Where do misunderstand? What you see is caused by the following code in "DocumentTemplate.DT_In.InClass.__init__": if has_key('sort'): self.sort=sort=args['sort'] if sort=='sequence-item': self.sort='' This means, "dtml-in sort=sequence-item" does not sort by "sequence-item" but by the complete tuple (key,item). I think, the special treatment of lists of pairs is altogether a slight misfeature. It would probably have been better to use a special "dict" attribute in analogy to the "mapping" attribute to call for the special pair interpretation. 'sequence-item' should then still be the complete item and 'sequence-value' the second pair component. Probably, it is too late by now to change this. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )