Re: [Zope-dev] Caching problems
Bob Pepin wrote: On Wed, Aug 16, 2000 at 05:31:29PM +0100, Carlos Neves wrote: You directly change a nonpersistence participant object. As stated in http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html : [...] but mainly... RTFM ;-) Well, thanks, but too bad the only FM I've been able to find about Zope are those .py files in lib/python/... I spent a whole day looking for documentation on ZODB internals on zope.org and zdp.zope.org, without being able to find anything... how about adding that paper to the search engine on zope.org? Is there more documentation like that one out there? a couple actually, not located so that you can find them but they exist jim fulton's paper from the ipc8 (python conference) is excellent reading material. http://www.zope.org/Members/jim/Info/IPC8/ZODB3News also the uml models http://www.zope.org/Documentation/Developer/Models/ZODB/ and another excellent paper by andrew kuchling on zodb and ZEO http://starship.python.net/crew/amk/python/writing/zodb-zeo.html there is also a how-to... Cheers Kapil ___ 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] why is manage_addZSQLMethod unavailable ?
Why does this work dtml-call "_['testadd'].manage_addDTMLMethod('MethodId', 'Method Title','method text')" While this does not: dtml-call "_['testadd'].manage_addZSQLMethod('ZSQLID', 'ZSQL Title', 'DB','','select * from data')" Error Type: AttributeError Error Value: manage_addZSQLMethod I studies the Znolk product and found that it uses _setObject directly instead of manage_addZSQLMethod . I was able to overcome it by defining an one-line external method: - from Products.ZSQLMethods.SQL import * def manage_addZSQLMethod(self, sqlId, sqlTitle, connection_id, args, command): self._setObject(sqlId, SQL(sqlId, sqlTitle, connection_id, args, command)) - but it IMHO the visibility of manage_addDTMLMethod and manage_addZSQLMethod _should_ be the same ? - Hannu ___ 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] why is manage_addZSQLMethod unavailable ?
Why does this work dtml-call "_['testadd'].manage_addDTMLMethod('MethodId', 'Method Title','method text')" While this does not: dtml-call "_['testadd'].manage_addZSQLMethod('ZSQLID', 'ZSQL Title', 'DB','','select * from data')" Error Type: AttributeError Error Value: manage_addZSQLMethod I studies the Znolk product and found that it uses _setObject directly instead of manage_addZSQLMethod . In general there is an inconsistency in adding objects: sometimes you can use the manage_addYourProduct interface, and sometimes only going through the addProduct invocation (don't have the whole thing handy here) will do the trick. This can get very confusing. Wouldn't know if that's the matter here, though. I think this should be standardized in the interfaces. but it IMHO the visibility of manage_addDTMLMethod and manage_addZSQLMethod _should_ be the same ? I agree ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZPatterns and Strategies Patterns etc....
Hi Folks, Well.. I never heard any comments about my last question.. so I thought I'd try to frame it differently. I just read Coad's book on Object Models etc.. and I think I pretty well 'grok' it.. at least enough to be mildly dangerous. ;-) I'm implementing a project with ZPatterns and I would like to keep a balance between flexibility and sanity (and of course performance). I've been using 'raw Specialists' to keep the number of new classes down to a bearable number, but I'm beginnnig to thing that Zope would behave itself better if I were to create Product level sub-classes of Specialist instead. I guess I'd just like to 'hear' what folks think about these different strategies: at one end of the spectrum: 1) Use ZClasses and 'out of the box' specialists for 90% of the application. Make ZClass and only where python is *required*, use external methods. at the other end of the spectrum: 10) Use full Python products, possibly subclassed from ZPatterns classes (DataSkin, Specialist etc) and never use ZClasses at all... and there is the middle ground: 5) Use python products for low level logic. Create overriding methods that can be 'dropped in' at the admin interface level, or in a subclass, later to change the behavior (e.g., retrieveItem ). Make ZClass sub- classes so that userinterface can be easily modified later, and so that persistent propertysheets are easy to add... There are problems with each end of this spectrum... 1) There are still limitations on what you can easily do outside of python. PythonMethods are great but they have strict security limitations that make them cumbersome in some cases. When you want to call a method of an object, that is really a 'DTML/Python Method' you need to pass along context so you end up with a lot of: dtml-with FooManager dtml-let theResult="aMethodOfTheFooManager( )" /dtml-let /dtml-with This seems like a lot of monkey-business just to call a method. Also.. nested withs can generate problems with namespace pollution.. and unfortunately performance. 5) Same problems as above when invoking methods that are implemented as DTML/Python Methods.. otherwise.. not too bad.. this is where I'm living at the moment. All my DataSkin classes are structured as: DataSkin -- myBaseClass - zSubClassableWrapper - ZClass My Specialists are just plain old Secialists... (here's the problem.. should they be Python products so that they can have plain Python methods? 10) Everything is defined in Products... harder to integrate into other apps since it's hard to override/change methods without modifying source code on the file system. I can't believe everyone is doing it this way.. but then I con't believe that folks are pushing and popping namespaces all over the place like I seem to in my app Anyway.. thoughts are appreciated. ;-) thanks, -steve ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns and Strategies Patterns etc....
Steve Spicklemire wrote: Hi Folks, Well.. I never heard any comments about my last question.. so I thought I'd try to frame it differently. I just read Coad's book on Object Models etc.. and I think I pretty well 'grok' it.. at least enough to be mildly dangerous. ;-) I'm implementing a project with ZPatterns and I would like to keep a balance between flexibility and sanity (and of course performance). I've been using 'raw Specialists' to keep the number of new classes down to a bearable number, but I'm beginnnig to thing that Zope would behave itself better if I were to create Product level sub-classes of Specialist instead. I guess I'd just like to 'hear' what folks think about these different strategies: at one end of the spectrum: 1) Use ZClasses and 'out of the box' specialists for 90% of the application. Make ZClass and only where python is *required*, use external methods. I'm using this approach. I'm happy with it. In one current project, I've got nine specialists, twelve ZClasses. I'm using DTML methods and External methods in the specialists. 10) Use full Python products, possibly subclassed from ZPatterns classes (DataSkin, Specialist etc) and never use ZClasses at all... I'm using this approach. I'm happy with it. In another current project, I'm building a python product that consists of a single Specialist, plus some python classes that can act as ZClass base classes. This latter project involves more text processing and python stuff. The former project involves workflow and flexible presentation. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] DCOracle w/ 8.0.5 and HP-UX 11
Has anyone gotten this to work. I can get everything to compile but get a bus error when running DCOracle_test.py when importing oci_. I have python compiled with threads and used the -D_POSIX_C_SOURCE=199506L (-D_REENTRANT) flag. Any help would be greatly appreciated, Ron Wood ___ 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] patch for dtml-foo:bar:baz;
This may, or may not, break the alternate syntax patch/download @ http://www.zope.org/Members/Coventry/dtml_shortcut I'll investigate and find out, and release a new dtml_shortcut if needbe. (I specifically used a colon since it is valid xml) What about using a colon as the separator, but explicitly give the tag the name dtml-root? dtml-root foo:bar:childofbar having a whole tag of type ':' seems weird (in addition to possibly breaking current patches and such ;) if we didn't want the root to be the default we could use something like dtml-trans [path]:[path] with something like _root or __root being set aside as a special name for starting at the root (otherwise it would start in the current directory)...? This patch changes lib/python/DocumentTemplate/DT_HTML.py so that you can use paths for traversal in DTML entity syntax. The delimiter is ':', as it is valid as part of an XML entity, but not valid as part of a Zope object id. You can use dtml-:foo:bar; to ensure that traversal occurs from the root object. This patch is against Zope 2.2.1b1. It relies on the restrictedTraverse() api. A 2.1.x version would be possible, but would be rather messy. ___ 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] Strange behaviour on authorization
i have been trying to figure this out and get help to this almost one week... i have login form called login: clip form name="LoginForm" action="email_accounts" method="post" div align="center"centerpUsername or ID br input type="text" name="cn" size="10" maxlength="20"br Passwordbr input type="password" name="password" size="10" br br input type="submit" value="Select this button to continue" br /form /clip email_accounts is a DTML document: clip font face="Verdana, Arial" color="#ff" dtml-let resDTML="Imap('Authentication',REQUEST,1)" h2User dtml-var "resDTML.cn" dtml-var title_or_id/h2 /font TABLE border="1" bgcolor="#b0bf30" width=80% cellpadding=2 cellspacing=0 valign=top FORM ACTION="email_headers" METHOD="POST" TRTDfont color="#00" face="Verdana, Arial, Helvetica" size="1"Check?/TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"Account/TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"New messages/TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"Total messages/TD /TR TRTDINPUT TYPE="CHECKBOX" NAME="checkbox[]" VALUE="imap" CHECKED="yes" /TDTDfont color="#00" face="Verdana, Arial, Helvetica" size="1"dtml-var "resDTML.account"nbsp; /TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"dtml-var "resDTML.recent"nbsp;/TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"dtml-var "resDTML.msgcount"nbsp;/TD /TR TRTDINPUT TYPE="CHECKBOX" NAME="checkbox[]" VALUE="pop" /TDTDfont color="#00" face="Verdana, Arial, Helvetica" size="1"dtml-var "resDTML.popaccount"nbsp; /TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"nbsp;/TD TDfont color="#00" face="Verdana, Arial, Helvetica" size="1"nbsp;/TD /TR TRTDnbsp;/TDTDfont color="#00" face="Verdana, Arial, Helvetica" size="1"Check selected mailboxes:/TDTD INPUT TYPE="submit" VALUE="Go!"/TDTDnbsp;/TD/TR /FORM/TABLE /dtml-let /clip Zope loads login form with no problem (it's basicly static page) but when i try so POST data to email_headers with login form, popups Authorization failed window. I have tried to use my manager and superuser name and same values that i submitted, but nothing is accepted to auth. window. here's the traceback: Zope Error Zope has encountered an error while publishing this resource. Unauthorized Sorry, a Zope error occurred. Traceback (innermost last): File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.2.0/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: email_accounts) File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: email_accounts) File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLDocument.py, line 171, in __call__ (Object: email_accounts) File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: email_accounts) File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Let.py, line 147, in render (Object: resDTML="Imap('Authentication',REQUEST,1)") File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: resDTML.cn) (Info: resDTML) File string, line 0, in ? File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line 142, in careful_getattr File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLMethod.py, line 194, in validate (Object: email_accounts) File /usr/local/Zope-2.2.0/lib/python/AccessControl/SecurityManager.py, line 139, in validate File /usr/local/Zope-2.2.0/lib/python/AccessControl/ZopeSecurityPolicy.py, line 159, in validate Unauthorized: cn by the way resDTML="Imap('Authentication',REQUEST,1) is on External method called on email_headers document. I cathed REQUEST from login form and it shows: request form password 1234 cn 66 AUTHENTICATION_PATH proto_test password 1234 dtpref_rows 20 tree-s eJzTiFZ3hANPW/VYHU0ALlYElA AUTHENTICATED_USER jarkkov so i have authenticated user and i still can't login. All these documents work like they're supposed to in Zope 2.1.6, but not anymore when i installed Zope 2.2.0 on Solaris. Why is Zopesecurity trying to validate 'cn', which is value that i submit to another document. What went wrong here and how i fix this problem? jarkkov ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross
Re: [Zope] Zope is very slow!
Why do you see any need to turn ProxyRequests On? I run the ProxyPass too, but there is no need for the ProxyRequest and the Proxy module. Perhaps there lies your problem. -goe- My configuration looks like this: IfModule mod_proxy.c ProxyRequests On #ProxyReceiveBufferSize 65536 ProxyReceiveBufferSize 0 CacheRoot "/www/proxycache" CacheSize 5000 CacheGcInterval 1 CacheMaxExpire 48 CacheLastModifiedFactor 0.1 CacheDefaultExpire 5 ProxyPass /paginas/ http://200.xxx.xxx.xxx:8080/ ProxyPass /p_/ http://200.xxx.xxx.xxx:8080/p_/ ProxyPass /misc_/ http://200.xxx.xxx.xxx:8080/misc_/ ProxyPassReverse /paginas/ http://200.xxx.xxx.xxx:8080/ ProxyPassReverse /p_/ http://200.xxx.xxx.xxx:8080/p_/ ProxyPassReverse /misc_/ http://200.xxx.xxx.xxx:8080/misc_/ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] Product inhetitance question (similar question)
Title: RE: [Zope] Product inhetitance question (similar question) And what happen if the Class A is in a package PA. Clabb B is in a package PB. How do you access the namespace of PA from PB ? When I have tried, the inherited methods from A where not visible from B, and I and to recreate a copie of the method. (which is ugly !!!). Any suggestion ? Thierry Nabeth Research Fellow INSEAD CALT (the Centre for Advanced Learning Technologies) http://www.insead.fr/CALT/ -- From: Andy McKay [EMAIL PROTECTED] To: Daniel Rusch [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [Zope] Product inhetitance question Date: Thu, 17 Aug 2000 08:54:49 -0700 charset=iso-8859-1 Say I have a fully functional (and more importantly, working) Product will call A. I want to extend this Product's capabilities so I wish to derive another class from it, call it B. No problem, class B(A): . The question is, (I think the answer is no) is there a way to inherit (i.e. reuse common code and extend it) the manage_Add function and the dtml files from A??? Well by inheritance B has all the methods, properties etc you have in A. So the answer is yes, if A has the foobar method then B will have a foobar method. Or do I misunderstand your question? -- Andy McKay, Developer, ActiveState http://www.ActiveState.com Programming for the People --
Re: [Zope] mysqlUserFolder woes
My server had the same symptoms with zShop. Basically, everything works fine - for a while - then it starts to intermittently fail as the load to the server increases, until it is completley broken, with the system error below. Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] Patch for Netscape 'tree' bug?
** Reply to message from [EMAIL PROTECTED] on Fri, 18 Aug 2000 04:36:34 +0100 (BST) If it was the www.xlogx.org patch, yeah, I know the website is down (because of a silly man who tried to use Java servlets with Apache, and who broke my Apache conf files...), but I can email it to anyone asking for (It should be better putting it in a safe place !). BTW, I noticed my patch had problems with trees deeper than 3 levels, I should correct it soon. Regards, P.-J. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Patch for Netscape 'tree' bug?
** Reply to message from [EMAIL PROTECTED] on Fri, 18 Aug 2000 04:36:34 +0100 (BST) [Hoping you didn't receive my previous message.] If you talk about the www.xlogx.org patch, I've made the site available again, you can find it at http://www.xlogx.org/Zope/TreeTag.query_expr.patch Be careful, it has a problem with trees deeper than 3 levels, I think it's not a big work to correct this but I hate html and I don't have time to do it. I should take time those weeks, but I can't promise Regards, P.-J. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] . makes search engines happy...
Andy McKay wrote: Dont put . in id's... I try not to anyway. Could we say . or if your id has a . use something else eg: dots in ids are essential if you rely of search engine hits for your site. .html .gif .txt Just processing the extension on a file name is a lot quicker than doing a HEAD to get the content type :/ dtml-foo.[bar.dot].y Sorry, but yuk! ;-) 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] The date in Dutch
Michel Houben wrote: How can I fix the date in Dutch, for example Donderdag 17 Augustus 2000 instead of Thursday 17 August 2000. I hope someone can solve this problem. I don't know any Dutch. However, here's an external method that will convert the months and days of the week in a string from English to German. There are probably better names for the variables and such, so don't take this as as example of clear maintainable programming :) It ought be be pretty efficient. Assuming you call the external method D_date, use something like this: dtml-var "D_date('October February July, Tuesday, 23 March 2000')" import re # you can remove lines where the words are the same in both languages replacements={ 'Monday':'Montag', 'Tuesday':'Dienstag', 'Wednesday':'Mittwoch', 'Thursday':'Donnerstag', 'Friday':'Freitag', 'Saturday':'Samstag', 'Sunday':'Sonntag', 'January':'Januar', 'February':'Februar', 'March':'Mauml;rz', 'April':'April', 'May':'Mai', 'June':'Juni', 'July':'Juli', 'August':'Augustus', 'September':'September', 'October':'Oktober', 'November':'November', 'December':'Dezember' } class re_stored: def __init__(self, e, d): self.d = d self.regex=re.compile(e) def r(self, s): return self.regex.sub(self.d, s) replace_regexes=[] for e,d in replacements.items(): replace_regexes.append(re_stored(e,d)) def D_date(datestring): return reduce(lambda x,y: y.r(x), replace_regexes, datestring) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HOWTO (but to be improved) - linking to neighbours
Dieter Maurer wrote: Marcin Kasperski writes: * Problem The problem: while presenting some page, I would like to automagically add links to 'previous' and 'next' page in the same directory. Say you organize a bunch of HOWTOS and you would like to let the people navigate via 'next' links - without going back go table of contents. You could use: dtml-in "PARENTS[0].objectValues()" sort=id size=1 orphan=0 !-- Navigation -- dtml-var sequence-item !-- header/footer should be disabled -- /dtml-in Not exactly. I want my individual pages to be accessible via URL (i.e. bookmarkable, searchable via ZCatalog and external search engines etc). And I want previous and next links even if someone finds the page via its full URL - without going through any table of contents. Or I miss something. BTW: I use dtml-in to imlement table of contents. -- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl | | If information is written down two ways, one of the versions will soon | be out of date. Therefore: Write everything once and only once. (XP | practice) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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-with object calls first?
Hi, Just noticed this: If you do dtml-with object where object is something callable, it calls it. That's a bit unpleasant for things like Squishdot Sites which do something (return a list of all their elements) when you call them. So the only way to _really_ do what I thought dtml-with is for was to do dtml-with "object" which is sucky to say the least. Comments, anyone? 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] Dynamic object lookup
Helmut Toplitzer wrote: Hi! I'm trying to get objects (even acquired) by pasing a string to a python method. Has someone an idea how to make that work? getattr(self,'string') ? 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] [Ann] Another Zope Book
Fra: Kapil Thangavelu [mailto:[EMAIL PROTECTED]] I think most developers are forced to learn through trial and error because the docs don't do the components justice since they tend to focus on working understanding of zope's framework from dtml. and in the end they are forced to turn to the source which can be confusing without knowing the parts of the framework from a fundamental not a working perspective. comments? 2 right you are. We need more info about Zope from a Python programmers POW. Setting pages up in dtml is not that interresting from my point of view. We need more detailed documentation on all the seperate modules, and far more/better on making products. dtml is not for programming and business logic, only for presentation. Max M ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] The date in Dutch
Sent again -- here's a slightly more compact version, that avoids declaring a separate class to hold the expressions in. Michel Houben wrote: How can I fix the date in Dutch, for example Donderdag 17 Augustus 2000 instead of Thursday 17 August 2000. I hope someone can solve this problem. I don't know any Dutch. However, here's an external method that will convert the months and days of the week in a string from English to German. There are probably better names for the variables and such, so don't take this as as example of clear maintainable programming :) It ought be be pretty efficient. Assuming you call the external method D_date, use something like this: dtml-var "D_date('October February July, Tuesday, 23 March 2000')" import re # you can remove lines where the words are the same in both languages replacements={ 'Monday':'Montag', 'Tuesday':'Dienstag', 'Wednesday':'Mittwoch', 'Thursday':'Donnerstag', 'Friday':'Freitag', 'Saturday':'Samstag', 'Sunday':'Sonntag', 'January':'Januar', 'February':'Februar', 'March':'Mauml;rz', 'April':'April', 'May':'Mai', 'June':'Juni', 'July':'Juli', 'August':'Augustus', 'September':'September', 'October':'Oktober', 'November':'November', 'December':'Dezember' } replace_regexes=[] for e,d in replacements.items(): replace_regexes.append( eval("lambda x: re.compile('%s').sub('%s', x)" % (e, d))) def D_date(datestring): return reduce(lambda x,y: y(x), replace_regexes, datestring) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Dynamic object lookup
Chris Withers wrote: Helmut Toplitzer wrote: Hi! I'm trying to get objects (even acquired) by pasing a string to a python method. Has someone an idea how to make that work? getattr(self,'string') ? cheers, Chris NewsFolderClass is a CatalogAware Class created by me. Structured in the following way: /HM.News /News current folder tries to access HM.News return getattr(self,'HM') # from /News Returns: Error Encountered an error while publishing this resource. Error Type: AttributeError Error Value: validate Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: CatalogAware) File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 171, in publish File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: helpme) File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: helpme) File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/PythonMethod/PythonMethod.py, line 168, in __call__ (Object: helpme) (Info: ((NewsFolderClass instance at e442f8,), {}, None)) File string, line 2, in helpme (Object: CatalogAware) File /home/misc/s_zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Util.py, line 135, in careful_getattr AttributeError: (see above) Sorry! Maybe I've misunderstod sth? Helmut -- My GNUpg Fingerprint 1355 4103 AC62 6818 DBC9 48B1 8D7D 6250 2D92 B100 begin:vcard n:Toplitzer;Helmut tel;fax:++43 463/2700 505 tel;work:++43 463/2700 6247 x-mozilla-html:FALSE org:Universität Klagenfurt;Institut für Wirtschaftsinformatik und Anwendungssysteme (IWAS) adr:;;Universitaetsstrasse 65-67;Klagenfurt;Kaernten;9020;Austria version:2.1 email;internet:[EMAIL PROTECTED] note:Praktische Informatik x-mozilla-cpt:;-10816 fn:Helmut Toplitzer end:vcard
[Zope] The date in Dutch - last time!
Ok... this is the last time. You can put a line: del replacements just after the for loop, and save a tiny amount of memory. This might be a useful optimisation if you're dealing with a very large list of words to replace. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] sending mail slow?
Hi, I've noticed that sending mail from within Zope the sendmail tab or mailhost.send() is very slow (like it adds a few seconds to the time it takes to get a page back from a post). Why is that? how can I make it faster? I'd thought about having the actual mail sending done in a different thread/process but I don't know how I'd do that or whether it'd be worth doing. I wonder where the slowness is coming from :S 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] Total newbie with NTUserFolder 1.3 issues
On Thu, 17 Aug 2000 16:48:44 +0100, Christian Adams [EMAIL PROTECTED] wrote: I'm running Zope 2.2.0 over NT Server 4. Me too. I installed Python 1.5.2 and the latest Win32 Extensions, then unzipped NTUserFolder1.3.zip into C:\Program Files\ZopeServer\NTUserFolder Thats good. then ran both the init.py and NTUserFolder.py files after entering my Domain and PDC info into NTUserFolder.py I ran them both to get the respective .pyc files. Running a .py file doesn't create any .pc files. Those were created when you next started Zope and the files were *imported*. You didn't need to run them, but it has done no harm. . my question is... What now? What do I need to do next to actually get this stuff working as opposed to taking up disk space, because nothing yet has actually happened and, even if It has, I have no idea how to find out. You need to create an NTUserFolder object in your Zope database, using the /manage interface. You may have to delete any existing acl_users object first. Toby Dickenson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] NTUserFolder-1.3-Comments
On Thu, 17 Aug 2000 18:15:16 +0200, Jean Jordaan [EMAIL PROTECTED] wrote: Hi Toby In the source of NTUserFolder from end of last year I see: ## Experimental support for authenticating from a domain ## (rather than the local computer) Use this at your own ## risk. If you do, please let me know how you get on. I will ## only include a user interface for these parameters once I ## have independant verification that there are no problems. Have you had any feedback? Does this work at all? No feedback on this from anyone yet. Im not sure what that means Toby Dickenson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] The date in Dutch - really last time!
Ok... this is *really* the last time. I don't know why I was using a regular expression, when string.replace would have done just as well. Here's my final version of the external method. I *promise* I won't change it again. Of course, the simplest version would be from string import replace def D_date(datestring): datestring=replace(datestring, 'Monday', 'Montag') datestring=replace(datestring, 'Tuesday', 'Dienstag') # und so weiter However, this would be slower to execute than using "reduce", as below. from string import replace # you can remove lines where the words are the same in both languages replacements={ 'Monday':'Montag', 'Tuesday':'Dienstag', 'Wednesday':'Mittwoch', 'Thursday':'Donnerstag', 'Friday':'Freitag', 'Saturday':'Samstag', 'Sunday':'Sonntag', 'January':'Januar', 'February':'Februar', 'March':'Mauml;rz', 'April':'April', 'May':'Mai', 'June':'Juni', 'July':'Juli', 'August':'Augustus', 'September':'September', 'October':'Oktober', 'November':'November', 'December':'Dezember' } replace_fns=[] for e,d in replacements.items(): replace_fns.append( eval("lambda x: replace(x, '%s', '%s')" % (e, d))) del replacements def D_date(datestring): return reduce(lambda x,y: y(x), replace_fns, datestring) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Tracker and Zope 2.2
Hi! I tried to add Tracker on my Zope 2.2 and get following error after inserting id an title and press the add button. -- Zope Error Zope has encountered an error while publishing this resource. Error Type: TypeError Error Value: string, None Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. Traceback (innermost last): File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.2.0-linux2-x86/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: RoleManager) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: addTracker) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: addTracker) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/Products/ExternalMethod/ExternalMethod.py, line 251, in __call__ (Object: addTracker) TypeError: (see above) -- Thanks for any help Hanno Schulz catWorkX GmbH Stresemannstr. 364 22761 Hambug http://www.catworkx.de http://www.catbridge.de Tel.: +49 40 890 646 0 Fax: +49 40 890 646 66 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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-else and 'unexpected end tag'
Squishdot_manage_postings.dtml contains this weird bit of DTML: dtml-else reviewed FONT COLOR="RED"*/FONT /dtml-else reviewed Is this a weird bit of syntax that's allowed in DTML or is it a bug in the parser that means this isn't being picked up? If it's a weird bit of syntax, then there's a bug in dtml-in 'cos when you try to wrap the above in a dtml-in, you get that very unhelpful 'unexpected end tag, for tag /dtml-in postingValues' error. While I'm at it, that error, which you see a lot, is _really_ unhelpful, since it doesnt' actually tell you anything about the real problem ;-) 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] DCOracle help required
Hi, Let me explain my situation. The oracle server is version 7.3.4 running on Solaris. I compiled DCOracle 1.3.1b1 on the Sun using the Oracle 7 libraries. With this I can access an Oracle 8.0.5 database running on Linux over the network. Now I want to access the Oracle 7 database from a Linux machine. Only Oracle you can get for Linux is 8, so I'm using 8.1.6. I can get it to compile and installed. But when I do the following to the Oracle 7 database I get: import DCOracle dbc = DCOracle.Connect("ota/ota@ota1") OCI_ERROR at oci_8.c:326 ORA-01005: null password given; logon denied Traceback (innermost last): File "stdin", line 1, in ? File "/usr/lib/python1.5/DCOracle/ocidb.py", line 77, in __init__ sc=oci_8.Logon(u,p,s) OracleError: (1005, 'ORA-01005: null password given; logon denied') Can anyone please help me to get this to work... Thank you Alwyn Schoeman ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] NTUserFolder-1.3-Comments
Hi Toby No feedback on this from anyone yet. Well, that doesn't really sound encouraging .. So it looks like the main NT-based authentication for Zope is currently jcNTUserFolder, running as pcgi behind IIS. I'm making an intranet for 100-200 people, with offices on three continents connected via VPN. It would be very cool to be able to delegate all password worries to NT. cheers, -- jean ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] sending mail slow?
Chris Withers wrote: Hi, I've noticed that sending mail from within Zope the sendmail tab or mailhost.send() is very slow (like it adds a few seconds to the time it takes to get a page back from a post). Why is that? how can I make it faster? I'd thought about having the actual mail sending done in a different thread/process but I don't know how I'd do that or whether it'd be worth doing. I wonder where the slowness is coming from :S i was think about this in regard to doing bulk email, the best i could think of was to response.write and than send the email. no real confirmation but the user gets the page and the mail hopefully gets sent. i was planning on doing this from python with either calls to the mailhost or smtplib. Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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-with object calls first?
Chris Withers wrote: Hi, Just noticed this: If you do dtml-with object where object is something callable, it calls it. That's a bit unpleasant for things like Squishdot Sites which do something (return a list of all their elements) when you call them. So the only way to _really_ do what I thought dtml-with is for was to do dtml-with "object" which is sucky to say the least. Comments, anyone? Huhh?? why is that sucky? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] mailhosts and mail server speed
Kapil Thangavelu wrote: sent. i was planning on doing this from python with either calls to the mailhost or smtplib. MailHost uses smptlib now, IIRC It's the call to mailhost.send() which is slow. I'd love to know why :S How much influence does the the mail server speed have to this? How can I measure it? ;-) 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] dtml-var x != dtml-var x is sucky!
Kapil Thangavelu wrote: Comments, anyone? Huhh?? why is that sucky? The most common newbie trip-up is the difference between dtml-var x and dtml-var "x" This is another example of that suckiness. dtml-with doesn't say it executes its name, and doesn't feel like it should... 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] NTUserFolder-1.3-Comments
On Fri, 18 Aug 2000 13:00:41 +0200, Jean Jordaan [EMAIL PROTECTED] wrote: Hi Toby No feedback on this from anyone yet. Well, that doesn't really sound encouraging... Or maybe everyone is quietly happy Toby Dickenson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] NTUserFolder-1.3-Comments
Or maybe everyone is quietly happy Well, yes :) So, would all of those quietly happy people perhaps give a shout to reassure those of us who are loathe to install all of IIS for the sake of NT domain authentication? -- Jean Jordaan --technical writer-- Mosaic Sofware --Zope 2.1.6 on WinNT and W2K ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] mailhosts and mail server speed
Chris Withers wrote: It's the call to mailhost.send() which is slow. I'd love to know why :S How much influence does the the mail server speed have to this? How can I measure it? ;-) Set up Sendmail on localhost and see if the problem goes away. Sendmail (and most other mail servers) will queue the mail without holding up the connection. I don't know about you, but I get instantaneous mail processing this way. 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] mailhosts and mail server speed
Shane Hathaway wrote: It's the call to mailhost.send() which is slow. I'd love to know why :S How much influence does the the mail server speed have to this? How can I measure it? ;-) Set up Sendmail on localhost and see if the problem goes away. localhost is a windows NT workstation ;-) Sendmail (and most other mail servers) will queue the mail without holding up the connection. I don't know about you, but I get instantaneous mail processing this way. Hmm, I think our mailserver, which I was using for this, does a DNS check on the domain names to make sure they exist. I wonder if this is what is causing the slowness of the response? 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] cutting and pasting large folders
Hi Zopers I'm trying to cut and paste (or copy and paste) '/docs' to '/in/docs'. The browser spins for about a minute or two, and then returns "HTTP 500 - Internal server error". Is this because '/docs' is large (about 10 or 15 Mb) (not very large) or because it contains instances of my 'ccDoc' ZClass that doesn't want to be cut--pasted? Strangely (well, *I* think it's strange) I can copy everything inside of '/docs' (including a bunch of ccDoc's, a Zcatalog and a Ztopic) and paste them into (a new) '/in/docs' .. but now I have to transfer the properties on '/docs' to '/in/docs' .. or maybe this is a good time to move them to TinyTables. -- Jean Jordaan --technical writer-- Mosaic Sofware --Zope 2.1.6 on WinNT and W2K ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] mailhosts and mail server speed
Chris Withers wrote: localhost is a windows NT workstation ;-) ^^ This is the real problem and you know it. ;-) Hmm, I think our mailserver, which I was using for this, does a DNS check on the domain names to make sure they exist. I wonder if this is what is causing the slowness of the response? Very possibly. Manually add some entries to the HOSTS file and see if things don't get a little snappier. 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 )
[Zope] Workaround and a tree and dtml-in problem
Phil Harris wrote: Why isn't _ available in the tree tag? The workaround is to wrap it in a dtml-let posting = "_.getitem('sequence-item',0)" But now I'm confused. Surely dtml-in postingValues dtml-let posting="_.getitem('sequence-item',0)" dtml-tree posting branches="postingValues" dtml-var idBR /dtml-tree /dtml-let /dtml-in should produce the same results as: dtml-tree branches="postingValues" dtml-var idBR /dtml-tree It doesn't :( Why am I doing this you may ask? Well, I want to do batching at the top level and, AFAIK, dtml-in doesn't support this :( any ideas? 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] dtml-tree, the bane of my life :(
Okay, firstly, I notice dtml-tree doesn't support the standard abbreviation: dtml-TAG "x" - dtml-TAG expr="x" As the following: dtml-tree "_.getitem('sequence-item',0)" branches="postingValues" gives me: Error Type: KeyError Error Value: "_.getitem('sequence-item',0)" nice... Now the one that has me stumped :( Why does the following: dtml-tree expr="_.getitem('sequence-item',0)" branches="postingValues" Give me: Error Type: NameError Error Value: _ This is all in 2.1.6... cheers, Chris PS: The traceback for the last one: Traceback (innermost last): File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 214, in publish_module File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 179, in publish File E:\Zope\2179E4~1.6\lib\python\Zope\__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 165, in publish File E:\Zope\2179E4~1.6\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_postings) File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 102, in call_object (Object: manage_postings) File E:\Zope\2179E4~1.6\lib\python\App\special_dtml.py, line 120, in __call__ (Object: manage_postings) (Info: E:\Zope\2.1.6\lib\python\Products\Squishdot/Squishdot_manage_postings.dtml) File E:\Zope\2179E4~1.6\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: manage_postings) File E:\Zope\2179E4~1.6\lib\python\DocumentTemplate\DT_In.py, line 691, in renderwob (Object: postingValues) File E:\Zope\2179E4~1.6\lib\python\TreeDisplay\TreeTag.py, line 152, in render (Object: a tree tag) File E:\Zope\2179E4~1.6\lib\python\DocumentTemplate\VSEval.py, line 208, in eval (Object: _.getitem('sequence-item',0)) File string, line 0, in ? NameError: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unable to login with newly created user
On Thu, Aug 17, 2000 at 02:28:07AM -0700, Corey wrote: Will having the Owner role actually keep me from logging in as that user? I can't seem to create a user *without* the Owner role anyhow... jeeze. Any other suggestions? I appreciate the help - in the mean time, I'm gong to try installing version 2.1.6. Aha! Found it I think. The list of roles you see are possible selections. It's a selectbox, you need to select the roles you want your user to have, they'll be highlighted. The fact that they are listed doesn't mean they are selected :) -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio - ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] [Ann] Another Zope Book
Much of the aim of the "Product Developer's Guide" (see http://www.zope.org/Wikis/Docs/ProductDevelopersGuide) is to address the issues you bring up. It's been slow going, although I almost have the security chapter completed. Hopefully this weekend I'll be able to release that chapter. -Original Message- From: Kapil Thangavelu [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 17, 2000 11:19 PM To: Dieter Maurer Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [Zope] [Ann] Another Zope Book great plan. redundant no... desparetely needed? yes:) my thoughts... i've often felt thought that dc and zope cater a bit too much to the newbie crowd in the sense that the documentation is built around on touching upon a working knowledge of acquisition and the majority focuses on dtml. i often felt the need (and perhaps i'll scratch the itch) for a zope book for python developers. python is easy to learn, there is no reason zope can't be if it were approached as a collection of python frameworks. zodb (acqusition, persistence, zcatalog), medusa(asyncore+orb), document template, security. many of the components of zope are very suitable for reuse outside of zope to a python programmer if the pieces were understood as separate entities and explained how they worked in synergy to make zope work, i think there would be many more developers and products for zope. as is, you learn piecemeal unless you have the stomach and the time to go through all the source code. i've learned a bit (still learning) mainly from the source, but i think most developers are forced to learn through trial and error because the docs don't do the components justice since they tend to focus on working understanding of zope's framework from dtml. and in the end they are forced to turn to the source which can be confusing without knowing the parts of the framework from a fundamental not a working perspective. comments? Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Meet Paul Everitt at the Paris Zope Meeting !
Hi everyone ! The Paris Zope Meeting is a great opportunity for Europe's Zope community to meet Paul Everitt, CEO of Digital Creations, who is currently in France for holidays. It is also a chance to meet Zope developers from England, Germany, Switzerland and of course France. If you want to come to the event, please send a mail to [EMAIL PROTECTED] to let us know about your plans. Maybe some of us can already gather a day or two before the event ? A list of people who have already registered is available here: http://portalux.com/nnl/documents/zope-meeting/list Event Details: Date: Wednesday August 23rd 2000 Exact time: To be announced later Place: 18, rue du Faubourg du Temple - 75011 Paris Registration: http://portalux.com/nnl/documents/zope-meeting/ WebSite: http://zdp.zope.org/projects/eurozope/events/pariszopemeeting Mailing List: http://comlounge.net/mailman/listinfo/eurozope There are some talks planned, but due to the short preparation time, these are not fixed (yet). Maybe you can give a talk as well ? Just let us know. This is the first event organized by the EuroZope initiative, which tries to better support Zope in Europe due to the great response we received at the Linuxtag 2000 in Stuttgart. EuroZope infos: http://zdp.zope.org/projects/eurozope Maybe you want to attend some of the other events planned by the EuroZope team ? http://zdp.zope.org/projects/eurozope/events We still need Zopers who would like to help us organizing those future events. Let's discuss it on the EuroZope mailing list: http://comlounge.net/mailman/listinfo/eurozope Greetings, 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] Product question, third posting
I've created a folderish product. When I select that product from the available objects list, thus creating an instance of that product, I can create objects like dtml document and dtml method in the new folderish object (very similar to what happens when you instantiate a folder object, you can have a dtml method created in the new folder). The question is why can't I create objects from the Products directory, such as Local File System? The code below works great, I get a dtml document, two folders each with a dtml method in them HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION??? def manage_addSimpleSite(self, id, title='', createNewFolder=0, createEditFolder=0, REQUEST=None): """Add a new SimpleSite object with id *id*. If the 'createNewFolder' and 'createEditFolder' parameters are set to any true value, an 'New sub Folder' and an 'edit sub Folder' objects are created respectively in the new SimpleSite. """ ob=SimpleSite() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addDTMLDocument(id='index_html', title='') if createNewFolder: if (user is not None) and not ( user.has_permission('Add User SimpleSites', self)): raise 'Unauthorized', ( 'You are not authorized to add User SimpleSites.' ) ob.manage_addFolder(id='New'+id, title='', createPublic=1) if createEditFolder: if (user is not None) and not ( user.has_permission('Add Documents, Images, and Files', self)): raise 'Unauthorized', ( 'You are not authorized to add DTML Documents.' ) ob.manage_addFolder(id='Edit'+id, title='', createPublic=1) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) Thanks, Dan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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: updated Hotfix release for recent mutable object issue
Hi all - We recently made a Hotfix release to address an issue dealing with Zope APIs returning mutable objects that could be changed inappropriately from DTML (Hotfix_08_09_2000). After further investigation, there was another aspect to the problem that was not addressed in the recent hotfix. I've uploaded a new hotfix release (Hotfix_2000-08-17) that supercedes the one from the 9th and includes the extra fix required. http://www.zope.org/Products/Zope/Hotfix_2000-08-17/ If you run a Zope site and allow untrusted users to edit DTML on your site, you should install this updated hotfix. There is no need to uninstall the prior hotfix release. These fixes will also be in the 2.2.1 release, expected next week. 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 )
[Zope] TEST (please discard)
just a test, Sorry! Jack Morgan Debian GNU/Linux Enthusiast [EMAIL PROTECTED] http://www.mandinka.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Creating Graphs
We need the ability to create multiple graphs from data that we get from Postgres. Currently we use a py method to call gnu plot, but we are looking for an alternative to serve up graphs. Any suggestions? I took a look at the Python Image Library is this the best solution? TIA Stuart ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Can't change title of a common instance property sheet
I suppose this is some sort of lack in the Zope management UI, but maybe someone else knows how to do this: If you create a ZClass property sheet you can pick an ID and a title. But you don't seem to be able to EDIT the title of the property sheet ever again. Is there some magic property sheet property name or is there just no way to edit the title from the management interface? The other bizzare thing is that you can export a property sheet, but there seems no obvious way to import one anywhere. Anyone have a clue on this? What's it there for? TIA Jeff Sasmor [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] Pb getting local roles ... strange
Didier Georgieff wrote: Hello, I'm on 2.1.6. I'm trying to have an information box with all roles. dtml-in "AUTHENTICATED_USER.getRoles()" dtml-var sequence-item /dtml-in works OK. But doesn't give the local roles. So i tried dtml-with URL0 dtml-in "get_local_roles()" dtml-var sequence-item /dtml-in /dtml-with But it only gives ['owner'] and not the other local role ['roleFoo']. But the response is correct if i test with dtml-if "AUTHENTICATED_USER.has_role('roleFoo',this())" is True. Is it a bug or a misunderstanding ? I found nothing on the archives. Thanks in advance. Have you tried AUTHENTICATED_USER.getRolesInContext(this())? 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 )
[Zope] Re: Xron test
Nick, Two other Zopistas reported similar problems. Both succeeded eventually in getting Xron started, but we didn't succeed in diagnosing the problem, nor in determining precisely how to work around it. I myself haven't been able to reproduce the problem. The problem seems to occur only on Linux, but it does not always occur. Some users have successfully started Xron on Linux with no problem. The problem seems to have to do with contention for a lock on ZODB. Did you see any log or console message that would confirm this? One user went to the console and killed all the Zope processes that were running at the time, then restarted Zope from the command line. The second time, Zope started up correctly with Xron. Another user thought that he had mistakenly tried to start Zope while logged in as root. When he restarted as a different user, Zope started up with Xron correctly. I suspect that the user was not relevant to the Xron problem (it is normal in some installations to start as root), but that the restarting was the key. One user thought that the monitor process contributed to the lock contention. I don't know, but it might be worthwhile to try to restart Zope without the monitor (changing the start-up options to disable the monitor). The problem seems to relate to Xron's creating the Schedule catalog the first time the Xron product is loaded during Zope start-up. If you succeed in creating the Schedule one time, the problem will not recurr, as Xron will just use the existing Schedule. I hope that helps you get started. Let me know how it goes. I'll copy this email to the zope list in hopes that someone else can shed some light on the problem. -- Loren - Original Message - From: "Nicholas Lo" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: August 18, 2000 12:41 AM Subject: xcron test Hi Loren, I have a problem with installing Xron 0.9 onto my machine. Currently, I'm running SuSE Linux 6.4 on a 600MHz/128Mb/20Gb PC. I have followed the release note and set the STUPID_LOG_FILE environment variable to point the log file, and Xron itself is, of course, resides in the /Products directory. When I start Zope, the console looks okay. However, the browser keeps on loading and loading and could not show the Zope management screen. I have also tried Xron on my notebook, which is running Win98. Everything works just fine. I just wonder what's gone wrong. Thanks. Nick ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Add a folder anywhere from anywhere
Hi, USE CASE How to test if an "idFolder" exist in my "topFolder"? If the "idFolder" does not exist I would like to add it to "topFolder" Question == Who know why this code in an external method (EM) does not work? Code def addFolder(self, idFolder, topFolder): self=self.this() if not hasattr(topfolder,idFolder): self.getattr(self,topFolder).manage_addFolder(idFolder) PS: How to add a folder anywhere in the ZODB tree with an EM also located anywhere? Bye, FR. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] sending mail slow?
From: "Chris Withers" [EMAIL PROTECTED] I've noticed that sending mail from within Zope the sendmail tab or mailhost.send() is very slow (like it adds a few seconds to the time it takes to get a page back from a post). Why is that? how can I make it faster? I'd thought about having the actual mail sending done in a different thread/process but I don't know how I'd do that or whether it'd be worth doing. You could use Xron to schedule sending the email. You could schedule it for later or for "now". Either way the email would be sent asyncronously from the original request. (But check out another email dated today titled "Xron test"). -- Loren ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] . makes search engines happy...
Andy McKay wrote: Dont put . in id's... I try not to anyway. Could we say . or if your id has a . use something else eg: dots in ids are essential if you rely of search engine hits for your site. .html .gif .txt Just processing the extension on a file name is a lot quicker than doing a HEAD to get the content type :/ Hmm I suppose, I dont rely on search engines much so I have never worried about it. I always end up with some reason for them being imported no matter how hard I try. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] [Ann] Another Zope Book
There is room for both books. Zope is a powerful and very deep products. The majority of users are unlikely to go into a great deal of python, most are going to use the dtml and other basic functionality. If Zope is going to increase its market then this sort of book is essential to make Zope accessible. Can I help at all? But a book covering the internals will be useful. One of my gripes about the documentation is how spread out and hard to find it is there's Wiki's here, presentations there... I've often searched zope.org and come up blank, when people on the mailing list can point it to me in 2 mins. But searching zope.org is another matter entirely :) my 2 cents. - Original Message - From: "Max Møller Rasmussen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 18, 2000 2:19 AM Subject: Re: [Zope] [Ann] Another Zope Book Fra: Kapil Thangavelu [mailto:[EMAIL PROTECTED]] I think most developers are forced to learn through trial and error because the docs don't do the components justice since they tend to focus on working understanding of zope's framework from dtml. and in the end they are forced to turn to the source which can be confusing without knowing the parts of the framework from a fundamental not a working perspective. comments? 2 right you are. We need more info about Zope from a Python programmers POW. Setting pages up in dtml is not that interresting from my point of view. We need more detailed documentation on all the seperate modules, and far more/better on making products. dtml is not for programming and business logic, only for presentation. Max M ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Strange behaviour on authorization
Jarkko Veijalainen wrote: i have been trying to figure this out and get help to this almost one week... ... Zope loads login form with no problem (it's basicly static page) but when i try so POST data to email_headers with login form, popups Authorization failed window. I have tried to use my manager and superuser name and same values that i submitted, but nothing is accepted to auth. window. ... so i have authenticated user and i still can't login. All these documents work like they're supposed to in Zope 2.1.6, but not anymore when i installed Zope 2.2.0 on Solaris. Why is Zopesecurity trying to validate 'cn', which is value that i submit to another document. What went wrong here and how i fix this problem? Aha, it worked in 2.1.6 eh? That's the tip off. A *major* change between 2.1.x and 2.2.x is in the security dept. 2.2.x runs all methods using the security level of the _owner_ of the method, regardless of whether this is a lower or higher level than the currently authenticated user. My guess is that your method has no owner (which is what pre-2.2.x objects default to when run under 2.2.x). This means it is running as anonymous which does not have rights to do what you want. Specify an owner for the method that has sufficient rights to do what you want and try it again. Good luck, -Casey Duncan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Merging multiple catalogs
Before I go off into coding mode has anybody had to deal with merging results from multiple catalogs? I have several catalogs and I would like to make this transparent by only having one search results interface. I quickly made one Catalog indexing multiple Catalogs but the result is multiple sets of records returned... 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] How to execute multiple SQL statements in one SQL-Method ?
I know it can be done but forgot how. Stuart ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] How to execute multiple SQL statements in one SQL-Method ?
SQLSTATEMENT 1 dtml-var sql_delimiter SQLSTATMENT 2 -Original Message- From: Stuart Foster [mailto:[EMAIL PROTECTED]] Sent: Friday, August 18, 2000 1:14 PM To: Zope List Subject: [Zope] How to execute multiple SQL statements in one SQL-Method ? I know it can be done but forgot how. Stuart ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Installing Zope
The Zope install notes say to find an installation directory that is *not* accessible to your web server. Is there a good reason for this? Security? Zope will install easily, if I put everything into my commercial host's cgi-bin. Is this asking for trouble? Yes, I have read gldnspud's "Third-Party Web Host" notes. But things are different enough on my host to cause problems. S. I have no control of anything written below this line. ___ Get your free, permanent e-mail @www.com, the original Net address! - http://www.com/freemail Listen to your favorite music while you work! - http://www.com/radio ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Zope-dev] Aaargh, no safe seperators :S
dtml-foo.[bar.dot].y In all the computer languages I know there's already a convention for solving this kind of problem. dtml-foo.bar\.dot.y But I prefer path-style identifiers: dtml-/foo/bar\.dot/y Then the correspondence to the site's folder structure is evident. Plus you can support both relative and absolute paths without confusing anybody: dtml-foo/bar\.dot/y Or, if y is a *property* of bar.dot, dtml-foo/bar\.dot.y Dont put . in id's... I try not to anyway. Could we say . or if your id has a . use something else eg: dtml-foo.[bar.dot].y ? -- Andy McKay, Developer, ActiveState http://www.ActiveState.com Programming for the People - Original Message - From: "Chris Withers" [EMAIL PROTECTED] To: "Shane Hathaway" [EMAIL PROTECTED] Cc: "Jonothan Farr" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, August 17, 2000 1:57 PM Subject: [Zope-dev] Aaargh, no safe seperators :S Shane Hathaway wrote: That would probably work, but isn't kind of ugly? Now we'd be forcing people to realize that colons can be path separators. Only Mac users know this. :-) Well, / and \ are bad XML ; is bad XML, and _really_ ugly . confuses when there's .'s in ids Any other suggestions :S cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Apache is not caching Zope pages
Fabio Akita wrote: the lack of robustness of ZServer makes it very slow and unstable (as expected). That's certainly not expected by me :( How did you come to this conclusion? What do you mean by slow? What do you mean by unstable? The strange thing is that the directory used for the cache is been filled up with files but it looks like Apache is ignoring them and going directly to Zope. When I shut down Zope, it never goes to the cached files and when I make requests to Apache the Zope´s log grows up all the time for the same bunch of pages. Are you setting the cache headers in Zope? 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] Don't use relative links!
Stuart Foster wrote: However if I traverse the two folders sometimes the URL looks like mainfolder/subfolder/subfolder/subfolder/index_html Why.. somewhere on one of you pages you have a link something like a href="subfolder/index_html" that's a relative link and thanks to the magic of the Zope automatically inserted BASE tag (yurch!) will actually be a link to: http://yoursite.com/mainfolder/subfolder/subfolder/index_html so, the above should actually be: a href="dtml.url-subfolder/index_html" 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] Don't use relative links!
Chris Withers wrote: so, the above should actually be: a href="dtml.url-subfolder/index_html" erk :S a href="dtml.url-subfolder;/index_html" ^^^ sorry, 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] Merging multiple catalogs
There exists a howto on this very subject: http://www.zope.org/Members/Zen/howto/AdvZCatalogSearching Look under the "Or" section. Very helpful suggestions. Enjoy, Casey Duncan -Original Message--- From: "Andy McKay" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Zope] Merging multiple catalogs Date: Fri, 18 Aug 2000 09:34:17 -0700 charset="iso-8859-1" Before I go off into coding mode has anybody had to deal with merging results from multiple catalogs? I have several catalogs and I would like to make this transparent by only having one search results interface. I quickly made one Catalog indexing multiple Catalogs but the result is multiple sets of records returned... 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 )
Re: [Zope] dtml-with object calls first?
Chris Withers writes: If you do dtml-with object where object is something callable, it calls it. That's a bit unpleasant for things like Squishdot Sites which do something (return a list of all their elements) when you call them. So the only way to _really_ do what I thought dtml-with is for was to do dtml-with "object" which is sucky to say the least. I, definitely, prefer the current implementation to making "with" the (only) exception: currently, whenever you use the name parameter of a tag, the object is called when it is callable. If this would be changed, I am almost sure, Chris Withers would later complain about the inconsistency :-) 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] Creating an object from within another
Daniel Rusch writes: So far so good, Next hurdle, at least the problems have been cut down to hurdles from walls. I have a folderish product say myFolder, in the manage_addMyFolder function I want to create an object of my product B. so I do this: def manage_addmyFolder(self, id, title='', REQUEST=None): """Add a new myFolder object with id *id*. """ ob=myFolder() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addB(id='index_html', title='') -- if I change this to Try: (ob __of__ self).manage_addB() 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] Product inhetitance question (similar question)
NABETH Thierry writes: And what happen if the Class A is in a package PA. Clabb B is in a package PB. How do you access the namespace of PA from PB ? from PA import A, . whatever you need class B(A): When I have tried, the inherited methods from A where not visible from B, and I and to recreate a copie of the method. (which is ugly !!!). Almost unbelievable. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Probable Bug in OFS.Image.index_html
Today, I met again a strange problem: I wanted to implement an image relay for an international project: something like: if an image in the target language is available, take it, otherwise, the english image. My DTML looked like: dtml-let src="have_image(name,language) and _.getitem(language) or EN" image="_.getattr(src,name)" dtml-var "image.index_html(REQUEST,RESPONSE)" The result was very strange: When I forced Netscape to reload the image (SHIFT + reload), everything worked fine. However, when I did a simple reload, it sometimes worked and sometimes did not (showed a broken image). When I loaded the image with Pythons httplib, everything worked fine. I tracked this down to line 219 of "OFS/Image.py": Zope arrives their, when it receives an "IF-MODIFIED-SINCE" header and determines that the browser has an up to date image in its cache. Zope correctly set status 304 and then returns "RESPONSE". It seems that this is not a problem, when "index_html" is directly called from ZPublisher. However, in the context of the above "dtml-var", it confused Netscape completely (I can understand that!). I changed the "return RESPONSE" into "return ''" and everything works fine again. I will put this into the collector. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Bug in dtml-in size=1
Michael Best writes: http://classic.zope.org:8080/Collector/1056/view Back on Februrary 14th, I submitted this bug, however your account of it is much better than mine. You will find a patch (against Zope 2.1.6) under: URL:http://www.dieter.handshake.de/pyprojects/zope/dt_in.pat Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Fourth Posting, is this really that difficult or have I been blackballed :)balled :)
I've created a folderish product. When I select that product from the available objects list, thus creating an instance of that product, I can create objects like dtml document and dtml method in the new folderish object (very similar to what happens when you instantiate a folder object, you can have a dtml method created in the new folder). The question is why can't I create objects from the Products directory, such as Local File System? The code below works great, I get a dtml document, two folders each with a dtml method in them HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION??? def manage_addSimpleSite(self, id, title='', createNewFolder=0, createEditFolder=0, REQUEST=None): """Add a new SimpleSite object with id *id*. If the 'createNewFolder' and 'createEditFolder' parameters are set to any true value, an 'New sub Folder' and an 'edit sub Folder' objects are created respectively in the new SimpleSite. """ ob=SimpleSite() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addDTMLDocument(id='index_html', title='') if createNewFolder: if (user is not None) and not ( user.has_permission('Add User SimpleSites', self)): raise 'Unauthorized', ( 'You are not authorized to add User SimpleSites.' ) ob.manage_addFolder(id='New'+id, title='', createPublic=1) if createEditFolder: if (user is not None) and not ( user.has_permission('Add Documents, Images, and Files', self)): raise 'Unauthorized', ( 'You are not authorized to add DTML Documents.' ) ob.manage_addFolder(id='Edit'+id, title='', createPublic=1) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) Thanks, Dan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: Zope digest, Vol 1 #939 - 31 msgs
How do I unsubscribe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, August 18, 2000 3:00 PM To: [EMAIL PROTECTED] Subject:Zope digest, Vol 1 #939 - 31 msgs Send Zope maillist submissions to [EMAIL PROTECTED] To subscribe or unsubscribe via the web, visit http://lists.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] (When replying, please edit your Subject line so it is more specific than "Re: Contents of Zope digest...") Today's Topics: 1. Re: unable to login with newly created user (Martijn Pieters) 2. RE: [Ann] Another Zope Book (Chris McDonough) 3. Meet Paul Everitt at the Paris Zope Meeting ! (Maik Roeder) 4. Product question, third posting (Daniel Rusch) 5. Re: Workaround and a tree and dtml-in problem (Rik Hoekstra) 6. Declaration of a sheet property as a personnalise class... (Vincent) 7. Pb getting local roles ... strange (Didier Georgieff) 8. ANNOUNCE: updated Hotfix release for recent mutable object issue (Brian Lloyd) 9. Creating Graphs (Stuart Foster) 10. TEST (please discard) (Jack Morgan) 11. Re: Pb getting local roles ... strange (Shane Hathaway) 12. Can't change title of a common instance property sheet (Jeff Sasmor) 13. Add a folder anywhere from anywhere (Francois-Regis CHALAOUX) 14. Re: Xron test (Loren Stafford) 15. Apache is not caching Zope pages (Fabio Akita) 16. Re: sending mail slow? (Loren Stafford) 17. Re: . makes search engines happy... (Andy McKay) 18. Re: [Ann] Another Zope Book (Andy McKay) 19. RE: Strange behaviour on authorization (Casey Duncan) 20. RE: Tracker and Zope 2.2 (Ken Manheimer) 21. Merging multiple catalogs (Andy McKay) 22. Setting Default Properties in a Product ([EMAIL PROTECTED]) 23. URL is missing up in Zope (Stuart Foster) 24. How to execute multiple SQL statements in one SQL-Method ? (Stuart Foster) 25. RE: How to execute multiple SQL statements in one SQL-Method ? (Mabe, Brad) 26. Installing Zope ([EMAIL PROTECTED]) 27. Re: [Zope-dev] Aaargh, no safe seperators :S (Scott Shepherd) 28. Re: Apache is not caching Zope pages (Chris Withers) 29. Don't use relative links! (Chris Withers) 30. Re: Don't use relative links! (Chris Withers) 31. ANNOUNCE ZEO 0.2.3 Released (Jim Fulton) --__--__-- Message: 1 Date: Fri, 18 Aug 2000 15:40:18 +0200 From: Martijn Pieters [EMAIL PROTECTED] To: Corey [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope] unable to login with newly created user On Thu, Aug 17, 2000 at 02:28:07AM -0700, Corey wrote: Will having the Owner role actually keep me from logging in as that user? I can't seem to create a user *without* the Owner role anyhow... jeeze. Any other suggestions? I appreciate the help - in the mean time, I'm gong to try installing version 2.1.6. Aha! Found it I think. The list of roles you see are possible selections. It's a selectbox, you need to select the roles you want your user to have, they'll be highlighted. The fact that they are listed doesn't mean they are selected :) -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio - --__--__-- Message: 2 From: Chris McDonough [EMAIL PROTECTED] To: "'Kapil Thangavelu'" [EMAIL PROTECTED], Dieter Maurer [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL
RE: [Zope] Don't use relative links!
Where can I find more information on how this is done. I'm not familiar with the dtml. notation? Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Withers Sent: Friday, August 18, 2000 11:59 AM To: Stuart Foster; Zope List Subject: Re: [Zope] Don't use relative links! Chris Withers wrote: so, the above should actually be: a href="dtml.url-subfolder/index_html" erk :S a href="dtml.url-subfolder;/index_html" ^^^ sorry, 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 maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Odd problems with SiteAccess?
I have a directory with a SiteAccess rule in it. Under that directory, versions and Zcatalogs no longer seem to work. This is with (SiteAccess-2-0-0b3)) and Zope 2.2.0 and 2.2.1b1 When I add a version, I can't start working in it. Clicking on the button doesn't seem to do anything. When I add a Zcatalog and try to find items to it, I get the following error: Zope has encountered an error while publishing this resource. Error Type: IndexError Error Value: list index out of range Traceback (innermost last): File /usr/local/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.2.1b1-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.2.1b1-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_catalogFoundItems) File /usr/local/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_catalogFoundItems) File /usr/local/Zope-2.2.1b1-src/lib/python/Products/ZCatalog/ZCatalog.py, line 321, in manage_catalogFoundItems (Object: Traversable) IndexError: (see above) Can anyone help or suggest a way around this? I'm assuming it's a problem with SiteAccess and interaction with Zope 2.2x? -- /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] [Ann] Another Zope Book
I'm using ZODB and ZEO seperate from Zope, no problem. --Darrell - Original Message - From: "Dieter Maurer" [EMAIL PROTECTED] I think Andrew completed the extraction of the ZODB. This means, Zope applications can use it for persistency. You, immediately, gain ZCatalog features, too. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Nested Tag Creation
+---[ Dieter Maurer ]-- | Andrew Kenneth Milton writes: | I want to create a tag that has sub-tags. | | Now I know I can use blockContinuations to approximate this, but, I | think it would be cleaner to be able to define tags that are only available | within the context of the main tag (namespaces and all that). | | Have a look at "sqlgroup" in "Shared.DC.ZRDB.sqlgroup". | It does that, so you can learn how to do something similar. I spent some time trying to think of a Zope tag that did this, I forgot all about sqlgroup, and sqltest. Thanks! -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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] Don't use relative links!
Stuart Foster wrote: Where can I find more information on how this is done. I'm not familiar with the dtml. notation? Chris Withers wrote: so, the above should actually be: a href="dtml.url-subfolder/index_html" erk :S a href="dtml.url-subfolder;/index_html" ^^^ its referred to as the entity syntax of dtml. its mainly for saving typing in urls. the . syntax is standard attribute access of python. try a search on zope.org for entity syntax. i believe there is a doc in jim fulton's members folder that does some explaining, probably a how to as well. Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Probable Bug in OFS.Image.index_html
What version of Zope are you using? On Fri, Aug 18, 2000 at 08:21:36PM +0200, Dieter Maurer wrote: Today, I met again a strange problem: . . . I tracked this down to line 219 of "OFS/Image.py": Zope arrives their, when it receives an "IF-MODIFIED-SINCE" header and determines that the browser has an up to date image in its cache. Zope correctly set status 304 and then returns "RESPONSE". -- Andres Corrada-Emmanuel Email: [EMAIL PROTECTED] -- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating an object from within another
Dieter Maurer wrote: Daniel Rusch writes: So far so good, Next hurdle, at least the problems have been cut down to hurdles from walls. I have a folderish product say myFolder, in the manage_addMyFolder function I want to create an object of my product B. so I do this: def manage_addmyFolder(self, id, title='', REQUEST=None): """Add a new myFolder object with id *id*. """ ob=myFolder() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addB(id='index_html', title='') -- if I change this to Try: (ob __of__ self).manage_addB() whats is ob__of__self ??? acquisition at its best? attribute access to get a reference to the ob attr of self? kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Declaration of a sheet property as a personnalise class...
Vincent wrote: Hi, I would like to add a new property to a ZClass that I created. Right now, I can choose between int, date, text, selection..., How can I choose another ZClass I created in the same product ? Thanks Vincent AFAIK you can't store objects in property sheets. you can store them as subobjects of your ZClass if its ObjectManerish or Folderish (subclasses). Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Declaration of a sheet property as a personnalise class...
Vincent wrote: Hi, I would like to add a new property to a ZClass that I created. Right now, I can choose between int, date, text, selection..., How can I choose another ZClass I created in the same product ? AFAIK you can't store objects in property sheets. you can store them as subobjects of your ZClass if its ObjectManerish or Folderish (subclasses). Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Fourth Posting, is this really that difficult or have I been blackballed :)balled :)
btw daniel, i've looked at some your postings for the day and i thought i should tell you that most of your problems would go away if you did subobject adding in your __init__ method within your class or in the hook method manage_afterAdd within your class. for future reference. You'd get all the benefits of inheritance. Let manage_add to do just that, instantiate and set a instance of your class. Kapil Kapil Thangavelu wrote: Daniel wrote I've created a folderish product. When I select that product from the available objects list, thus creating an instance of that product, I can create objects like dtml document and dtml method in the new folderish object (very similar to what happens when you instantiate a folder object, you can have a dtml method created in the new folder). The question is why can't I create objects from the Products directory, such as Local File System? The code below works great, I get a dtml document, two folders each with a dtml method in them HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION??? def manage_addSimpleSite(self, id, title='', createNewFolder=0, createEditFolder=0, REQUEST=None): """Add a new SimpleSite object with id *id*. If the 'createNewFolder' and 'createEditFolder' parameters are set to any true value, an 'New sub Folder' and an 'edit sub Folder' objects are created respectively in the new SimpleSite. """ ob=SimpleSite() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addDTMLDocument(id='index_html', title='') if createNewFolder: if (user is not None) and not ( user.has_permission('Add User SimpleSites', self)): raise 'Unauthorized', ( 'You are not authorized to add User SimpleSites.' ) ob.manage_addFolder(id='New'+id, title='', createPublic=1) if createEditFolder: if (user is not None) and not ( user.has_permission('Add Documents, Images, and Files', self)): raise 'Unauthorized', ( 'You are not authorized to add DTML Documents.' ) ob.manage_addFolder(id='Edit'+id, title='', createPublic=1) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) a couple of things. A. you're not being blackballed. when you're posting to the list its hard to help without specifics. you're posting above, would be better with a traceback of code that does attempt to instantiate a product. which leads to B. how are you attempting to instantiate your other products. example code of what you're trying to do would be helpful. are you doing it the same as adding folders like above... i have no idea... C. seems like you're doing this in python. the code below should work fine. from Products import LocalFS in manage_add: id = 'foo' ob2 = LocalFS.LocalFS(id) # check the exact calls to __init__ in LocalFS id2 = 'foo2' ob = yourproduct(id2) ob._setObject(id , ob2) in __init__ or manage_afterAdd id ='foo' ob = LocalFS.LocalFS(id) self._setObject(id, ob) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] What's the best way to go from Zope to Oracle time and back..
Total newbie question here.. The subject line says it all.. What's the best way to go from Zope to Oracle time and back? I would like to store the "beef" of my data in Oracle tables, and "instantiate" Zope objects from those tables.. Obviously this will require going back and forth between Zope and Oracle datetimes.. What's the best way to do this? I thought I had seen something like this in a HowTo, but I cant seem to find it.. Thank you. Chris [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] Nested Tag Creation
+---[ Dieter Maurer ]-- | Andrew Kenneth Milton writes: | I want to create a tag that has sub-tags. | | Now I know I can use blockContinuations to approximate this, but, I | think it would be cleaner to be able to define tags that are only available | within the context of the main tag (namespaces and all that). | Have a look at "sqlgroup" in "Shared.DC.ZRDB.sqlgroup". | It does that, so you can learn how to do something similar. SQL defines a new document type 'sql template' and defines the tag within that template only, and there's no implicit nesting of the tags. It doesn't look currently possible do define a general use tag that works the way I want (yet). I'll keep looking at it. I might be able to define the commands[] inside the actual tag, but, I don't think that that's going to work. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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] Referencing an object in a subfolder
Chris Withers wrote: "Smith, Paul" wrote: I want to create an "images" directory for a web site and store image objects there that I can reference. How do I get a DTML document in a higher directory to see the images folder and locate the appropriate image? dtml-with images_folder dtml-var an_image /dtml-with cheers, Chris alternatively dtml-var "path.to.images.folder.image" Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Dots versus underscore in DTML
I know dots in file names are important when submitting the pages to the search engines. When I use them however, I'll loose the view tab(folder) when trying to view say index.html and I have to click on the file and then view it. If the file was named index_html I could just click on the view tab in the folder to view it. Is it possible to have dots in my methods and still have the view tabs on my folders? Anyone? George ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Creating an object from within another
I think he meant ob.__of__(self) which wraps ob into the context of self. Useful for returning unwrapped Python objects while you're in Python. On Fri, 18 Aug 2000, Kapil Thangavelu wrote: Dieter Maurer wrote: Daniel Rusch writes: So far so good, Next hurdle, at least the problems have been cut down to hurdles from walls. I have a folderish product say myFolder, in the manage_addMyFolder function I want to create an object of my product B. so I do this: def manage_addmyFolder(self, id, title='', REQUEST=None): """Add a new myFolder object with id *id*. """ ob=myFolder() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addB(id='index_html', title='') -- if I change this to Try: (ob __of__ self).manage_addB() whats is ob__of__self ??? acquisition at its best? attribute access to get a reference to the ob attr of self? kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 )