[Zope] Zope 2.7.2 with Ape 1.0 installed in root, fails to restart, without any usefull logging, after adding a local role
I sent roughly this email directly to Shane Hathaway, since I hadn't asked for any help on Zope, yet, so didn't know where to look. Maybe this was a better avenue? If you read this list, Shane (or Mr. Hathaway, if you prefer), respond on whichever seems more appropriate, I guess. I don't know, let me know if I'm missing some etiquette point. Anyways, I'm using Ape 1.0 set-up in the root of Zope 2.7.2 install, based on the example fs config, and that is working fine. I was having a problem where some change was making that Zope instance not even get far enough in booting to write to the event.log (set to level all). I narrowed it down to adding a local role on the security tab of the root object. I revert the .properties file and restart - it works. I make the change again and restart - it doesn't. I diff the file, and the only difference is the define-role line. The problem is I have no idea where to start even, since no errors are thrown where I know to find them. Zope just doesn't respond at all when I try to restart it, and writes nothing to the log. If anyone could tell me what I can do to at least track down the problem, if not fix it, it would be much appreciated. Thanks, Tim ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] It is a bug ? 404 error onfly
Hi ! My contributor have a problem. His problem is very interesting, but it is in php. I try to help, but I get same problem in Zope. The problem is that: He have a site, and he is paranoid. He is not use static pages to avoid penetrations. So: in a dynamic page he is check the request. If parameters are wrong, he is want to set the resp. header status to 404. (This is a file downloader method, and if the file is invalid, he want to answer 404 - page not found.) He is not want to set location to a static 404 error page (because he is want to "protect" the orig. URL). When he is send header with php to Mozilla, or Opera, these browsers are showing blank page. IE is showing good page (404). Then I try to write this example in Zope, to help it: # test2.py # request = container.REQUEST resp=RESPONSE = request.RESPONSE resp.setStatus(404) When I try this, I get same result in Zope (/test2). So: what is the problem ? And what is the solution ? Thanx for help: ft ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZSyncer and ZEO
Does ZSyncer have any problem with Zope/ZEO systems? I have some anecdotal evidence of problems as we migrate to a multiheaded Zope/ZEO systems architecture. Is there any difficult using ZSyncer between a Zope and a Zope/ZEO combination. Are there problems syncing between Zope 2.6.X and Zope 2.7.X systems? All the systems run ZSyncer 0.5.1. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] what are the dtml for logout and deleting a existing user??
Jens Vagelpohl wrote: That's only as weird as basic HTTP auth itself. There *is* no other way to make the browser discard the credentials you typed in other than to tell the browser that an access is unauthorized, which will then always pop up the login box again. This has nothing to do with Zope, it's just basic HTTP auth. Incidentally, I've noticed that newer versions of Firefox, and if I'm not mistaken, IE, provide menu options to drop current basic auth credentials... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] strftime
Luiz Fernando B. Ribeiro wrote: Date In a strange behaviour using strftime is displaying dates with 1 day past, example 10/05/2005 is being show as 09/05/2005. Well, it certainly sounds like a timezone issue, maybe in ZMySQLDA, maybe in DateTime itself. Boil it down to a minimal reproducible test case. If that only involves DateTime, then submit to the Zope collector on Zope.org, if it needs ZMySQLDA to happpen, report the issue in the mysql-python collector on SourceForge... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Managing Users with Postgresql.
Fernando Lujan wrote: I know that it isn't the best solution, and now I want to change it! :) Which is the best solution to solve my problem? I found pgUserFolder. But I'm not so sure if this will be the best solution. Google for SimpleUserFolder, much simpler and easier. (and supported!) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How do I delete acl_users using DTML??
Allen Huang wrote: How do I delete acl_users using DTML code?? More to the point, why on earth would you want to?! Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
> It doesn't look like a monkey patch. Those aren't invisible in tracebacks. > > Follow the code path higher until you do get some effect. I've seen odd things before, but I agree, it isn't likely that it's a monkey patch. Chances are that some product is outdated. > I would imagine it's some sort of redirect. I would start with using the > IP address: usually this is enough to avoid the redirect. Otherwise, > find out how to turn "access rule" off. I think this may be in > Zope/doc/SECURIY.txt. > > I don't think it's possible to really remove the Zope Control Panel. You can't overwrite the manage URL with Zope, it's just not allowed. I suspect there's some external URL rewriting happening here. Either that or the guy was a real PITA and rewrote Zope to work with his pet ideas. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
Phillip Hutchings wrote: Then generated the error. The error log shows the same output as before. Not only should the line number be one higher, I also put a dummy variable name on that line to generate a stupid error msg. How can it not be getting to that code? I've searched for another Zope instance, but found none. This is really odd. It sounds like it could be getting patched somewhere. Try raising exceptions from various points in the method, see if one gets there. It doesn't look like a monkey patch. Those aren't invisible in tracebacks. Follow the code path higher until you do get some effect. Also, you are saying that I probably will never get the Control Panel back on this site with Product Management tools; no Product refresh then, I suppose. I'll have to thank the previous developer, as you suggest! (of course there is no documentation either, arrgh!) If you can think of anything else, I'd appreciated it. If the /manage URL has been overridden it's probably possible to fix it. Try going to /manage_workspace, see if that works. Is Zope behind a proxy? It's possible that it's being done with a URL rewrite somewhere. I would imagine it's some sort of redirect. I would start with using the IP address: usually this is enough to avoid the redirect. Otherwise, find out how to turn "access rule" off. I think this may be in Zope/doc/SECURIY.txt. I don't think it's possible to really remove the Zope Control Panel. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
Thanks for your help. I really needed another brain to bounce things off of so I can get out of the rut I'm in. You've given me some fresh ideas to try. Thanks. Barry --- Phillip Hutchings wrote: > > Then generated the error. The error log shows the > > same output as before. Not only should the line > > number be one higher, I also put a dummy variable > name > > on that line to generate a stupid error msg. > > > > How can it not be getting to that code? I've > searched > > for another Zope instance, but found none. > > This is really odd. It sounds like it could be > getting patched > somewhere. Try raising exceptions from various > points in the method, > see if one gets there. > > > Also, you are saying that I probably will never > get > > the Control Panel back on this site with Product > > Management tools; no Product refresh then, I > suppose. > > I'll have to thank the previous developer, as you > > suggest! (of course there is no documentation > either, > > arrgh!) > > > > If you can think of anything else, I'd appreciated > it. > > If the /manage URL has been overridden it's probably > possible to fix > it. Try going to /manage_workspace, see if that > works. Is Zope behind > a proxy? It's possible that it's being done with a > URL rewrite > somewhere. > > -- > Phillip Hutchings > http://www.sitharus.com/ > [EMAIL PROTECTED] / [EMAIL PROTECTED] > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
> Then generated the error. The error log shows the > same output as before. Not only should the line > number be one higher, I also put a dummy variable name > on that line to generate a stupid error msg. > > How can it not be getting to that code? I've searched > for another Zope instance, but found none. This is really odd. It sounds like it could be getting patched somewhere. Try raising exceptions from various points in the method, see if one gets there. > Also, you are saying that I probably will never get > the Control Panel back on this site with Product > Management tools; no Product refresh then, I suppose. > I'll have to thank the previous developer, as you > suggest! (of course there is no documentation either, > arrgh!) > > If you can think of anything else, I'd appreciated it. If the /manage URL has been overridden it's probably possible to fix it. Try going to /manage_workspace, see if that works. Is Zope behind a proxy? It's possible that it's being done with a URL rewrite somewhere. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
Thank you Phillip. I modified the zope.conf file as you suggested and did sudo ./zope stop ... usual msg sudo ./zope start ... usual msg Then generated the error. The error log shows the same output as before. Not only should the line number be one higher, I also put a dummy variable name on that line to generate a stupid error msg. How can it not be getting to that code? I've searched for another Zope instance, but found none. Also, you are saying that I probably will never get the Control Panel back on this site with Product Management tools; no Product refresh then, I suppose. I'll have to thank the previous developer, as you suggest! (of course there is no documentation either, arrgh!) If you can think of anything else, I'd appreciated it. Thanks. Barry --- Phillip Hutchings wrote: > > I modify utils.py, after saving a copy, in order > to > > obtain diagnostic output. Then I delete > utils.pyc, > > after saving a copy, in order to force a recompile > > (even used compilezpy.py for this a couple of > times). > > Zope never seems to use the new version. > > Restart Zope. Python will pick up the changes. Also, > if you're > modifying security code, make sure you set > security-policy-implementation to Python in > zope.conf, otherwise > you're using the C one, and no matter what changes > you make to the > Python scripts you won't see any changes. > > > I suspect that I have a fundamental > misunderstanding > > of how Zope uses code in the Products directory. > > > > Is Zope storing all the compiled byte code in the > > data.fs file? Is there a way to force Zope to use > new > > code? > > No. Refresh the product or restart Zope. > > > Also, the previous developer removed the Control > Panel > > putting Plone as the root of everything. How can > I > > get information that the Control Panel usually > > provides? > > Find a heavy object, find the developer, bring the > two together at > speed. Repeat until the problem is fixed. > > yoursite/manage will get you to the control panel. > If he's managed to > override /manage then you have problems... > > And the real problem: > > > TypeError: can only concatenate tuple (not "list") > to > > tuple > > Like it says, you're supplying a list, you want a > tuple. It looks like > you need to update PluginIndexes, I don't know where > they come from. > > > -- > Phillip Hutchings > http://www.sitharus.com/ > [EMAIL PROTECTED] / [EMAIL PROTECTED] > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
> I modify utils.py, after saving a copy, in order to > obtain diagnostic output. Then I delete utils.pyc, > after saving a copy, in order to force a recompile > (even used compilezpy.py for this a couple of times). > Zope never seems to use the new version. Restart Zope. Python will pick up the changes. Also, if you're modifying security code, make sure you set security-policy-implementation to Python in zope.conf, otherwise you're using the C one, and no matter what changes you make to the Python scripts you won't see any changes. > I suspect that I have a fundamental misunderstanding > of how Zope uses code in the Products directory. > > Is Zope storing all the compiled byte code in the > data.fs file? Is there a way to force Zope to use new > code? No. Refresh the product or restart Zope. > Also, the previous developer removed the Control Panel > putting Plone as the root of everything. How can I > get information that the Control Panel usually > provides? Find a heavy object, find the developer, bring the two together at speed. Repeat until the problem is fixed. yoursite/manage will get you to the control panel. If he's managed to override /manage then you have problems... And the real problem: > TypeError: can only concatenate tuple (not "list") to > tuple Like it says, you're supplying a list, you want a tuple. It looks like you need to update PluginIndexes, I don't know where they come from. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie question
I'm getting an error in CMFCore.utils in the _mergedLocalRoles function. The error is: Exception Type TypeError Exception Value can only concatenate tuple (not "list") to tuple I modify utils.py, after saving a copy, in order to obtain diagnostic output. Then I delete utils.pyc, after saving a copy, in order to force a recompile (even used compilezpy.py for this a couple of times). Zope never seems to use the new version. Also, I added comments ahead of the line where the error occurs so that the line number should be higher than the original error line number. But, it's always the same. I suspect that I have a fundamental misunderstanding of how Zope uses code in the Products directory. Is Zope storing all the compiled byte code in the data.fs file? Is there a way to force Zope to use new code? Also, the previous developer removed the Control Panel putting Plone as the root of everything. How can I get information that the Control Panel usually provides? System: Zope 2.7.1, Plone 2.0.5, Python 2.3.4, Red Hat 7.2 Thank you. Barry Drake The traceback: Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.CMFFormController.ControllerPageTemplate, line 80, in __call__ Module Products.CMFFormController.BaseControllerPageTemplate, line 39, in _call Module Products.CMFFormController.ControllerBase, line 243, in getNext Module Products.CMFFormController.Actions.TraverseTo, line 36, in __call__ Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.CMFFormController.ControllerPythonScript, line 159, in __call__ Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 19, in pag_edit - - Line 19 Module Products.CMFDefault.Document, line 192, in edit Module Products.CMFCore.CMFCatalogAware, line 69, in reindexObject Module Products.CMFCore.CatalogTool, line 262, in reindexObject Module Products.CMFCore.CatalogTool, line 235, in catalog_object Module Products.ZCatalog.ZCatalog, line 528, in catalog_object Module Products.ZCatalog.Catalog, line 381, in catalogObject Module Products.PluginIndexes.common.UnIndex, line 240, in index_object Module Products.PluginIndexes.KeywordIndex.KeywordIndex, line 61, in _index_object Module Products.PluginIndexes.KeywordIndex.KeywordIndex, line 94, in _get_object_keywords Module Products.CMFCore.CatalogTool, line 63, in allowedRolesAndUsers THE FOLLOWING ERROR SHOULD BE ON LINE 216 NOW, BUT HASN'T MOVED FROM THE ORIGINAL. Module Products.CMFCore.utils, line 215, in _mergedLocalRoles TypeError: can only concatenate tuple (not "list") to tuple ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] surprising interaction between Javascript and Zope
On 25/05/05, Dennis Allison <[EMAIL PROTECTED]> wrote: > > We have a need to set a session variable concurrently with a > user submitting a form on a mouse click. I accomplish this with > a bit of JavaScript associated with the OnClick attribute of the > form: > > location.replace('/setSesVar?var=nams&val=xxx;frm.submit(); > > which does the job except that the setSesVar script is executed twice, a > fact we discovered by monitoring calls to the setSesVar script. Once with > an incorrect parameter, and secondly with a correct parameter. > > There is probably some obvious explanation, but I am stumped. Setting > invalid values into session variables, even transient invalid values, can > cause problems. That JavaScript will never work properly. What you're doing is telling the browser to go to a new page, then submit the form. However, the form is no longer there, because you're on the new page. The behaviour you're seeing is probably caused by the browser getting completely confused. Why aren't you doing this in the server side script that the form calls? It makes more sense to do it that way. If you insist on doing it the current way you'll need to use a hidden iframe and load the page there, or use XmlHttpRequest to perform a subrequest. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] surprising interaction between Javascript and Zope
We have a need to set a session variable concurrently with a user submitting a form on a mouse click. I accomplish this with a bit of JavaScript associated with the OnClick attribute of the form: location.replace('/setSesVar?var=nams&val=xxx;frm.submit(); which does the job except that the setSesVar script is executed twice, a fact we discovered by monitoring calls to the setSesVar script. Once with an incorrect parameter, and secondly with a correct parameter. There is probably some obvious explanation, but I am stumped. Setting invalid values into session variables, even transient invalid values, can cause problems. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Create a list using DTML.
Fernando Lujan wrote: I think you are close. Change to ? It's working like IN over a string, e.g. the [5,61] will make selected the number 5,6 and 61. Where id_test is the result of the database query wich return in this format: {1,2,3}. I modify it to a (1,2,3) and finally I try the Following this api: list (sequence) Return a list whose items are the same and in the same order as sequence's items. If sequence is already a list, a copy is made and returned, similar to sequence[:]. For instance, list('abc') returns returns ['a', 'b', 'c'] and list( (1, 2, 3) ) returns [1, 2, 3]. I need a integer-list, is it possible? Fernando, I'm rusty with DTML But I know you can get a list returned using _.string.split(idstest,',') But Id call a python script with idstest as a param, eg Eg, python import string idstest = '{1,2,3}' # test only is param s = s[1:-1] list = string.split(s,',') return list Good luck! David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Create a list using DTML.
On 24/05/05, David H <[EMAIL PROTECTED]> wrote: > >I have a array data type in my DB wich have the following format : > >{1,2,3} ( ids_test ). Now in my web application, I have a multiple > >select wich options must be marked as selected if the number is in the > >array described above. How can I make the above format be converted to > >a list of elements? > > > >For instance: > > > > > > > > > > > > > > > > > > > > >ids_test> selected="true"> > > > > > > > > > > > I think you are close. Change to > ? It's working like IN over a string, e.g. the [5,61] will make selected the number 5,6 and 61. Where id_test is the result of the database query wich return in this format: {1,2,3}. I modify it to a (1,2,3) and finally I try the Following this api: list (sequence) Return a list whose items are the same and in the same order as sequence's items. If sequence is already a list, a copy is made and returned, similar to sequence[:]. For instance, list('abc') returns returns ['a', 'b', 'c'] and list( (1, 2, 3) ) returns [1, 2, 3]. I need a integer-list, is it possible? -- Fernando Lujan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can ZPT form call a url?
> The easiest way it to perform a redirect. > > Unfortunately, HTTP allows automatic redirects only for "GET" requests. > But, if you can live with "GET", then it is very easy. Fortunately, most web browsers are lax and let you do this. Safari is not, but the warnings are a bit obscure to most users, as a 302 response technically means to repost the data to a new URL - hence Safari's 'do you want to resend this data' question. A 303 response should be used to redirect a POST request. The user is still supposed to be asked if they want to follow the redirect, but I bet most browsers won't, as the specs are ambiguous. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Hiding HTML URL
Dne úterý, 10. května 2005 00:48 J Cameron Cooper <[EMAIL PROTECTED]> napsal(a): > Allen Huang wrote: > > I just want to show my root URL address whenever people browse into > > other pages of my site. How do I do this in dtml or python script or > > external method?? > > If I understand what you're asking, there's only one "good" way to do > that: place your content in an iframe (or regular frame). You might > modify main_template to do this. The frame's contents could change, but > not the URL (since the "container" page is still the same.) You can see > this effect in the ZMI. any other technique than frameset in this cause will make you big troubles in SEO marketing magic. If you will use one folder for one document, you will make search engines very happy and your boss will be later happy too. -- Jaroslav Lukesh --- This e-mail can not contain any viruses because I use Linux ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Finding an object in a folder
Chris Withers wrote at 2005-5-23 20:02 +0100: >Dieter Maurer wrote: >>>Here is the problem. I want to use a form to upload a file (with a specific >>>name) but first I want to check if another file with the same name already >>>exist in that folder. How do I use a if or dtml-if to solve this problem?? >> >> >> "the_id" exists >> >> "the_id" does not exist >> > >Dieter, I'm shocked ;-) > >Why in DTML? Even though Allen mentions DTML, this never belongs in DTML. We are already familiar with the fact that we often disagree. This is another case. The test whether an object exists is sufficiently trivial (and often needed) that it can be in DTML without a problem. An incredibly long time ago, I filed a feature request for "hasattr_unacquired" -- together with patch, unit tests and documentation update. I am convinced that such a function in the DTML namespace (and therefore always available in restricted code) would be much clearer than the "aq_inner.aq_explicit" dance. But, unfortunately, the Zope developers decided not to accept my patch or the "hasattr_unacquired" idea and instead made "aq_inner" accessible by untrusted code. A bad decision! As a consequence, you see the nasty code. By the way, it is as nasty in Python as it is in DTML. >Worse still, you use hasattr with ZODB... hastattr swallows all >exceptions, including ConflictErrors, and especially in this example >that would be a bad thing... Again, the correct way to approach this problem is not to ban "hasattr" from thousands of places but to monkey patch "__builtin__.hasattr" such that it behaves in a Zope compatible way. I have seen several severely broken trial to work around the use of "hasattr" -- by Zope experts not Zope newbies. I strongly argue against it. Fix "hasattr" in the Zope context, instead! >if getattr(thefolder.aq_inner.aq_explicit,the_id,None): You are aware that this is in general *NOT* an emulation of "hasattr". It may fail e.g. for properties. Such half faithful "hasattr" emulations will make more problems then even the unfixed "hasattr" use. And it would be so easy to fix "hasattr" ;-) -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can ZPT form call a url?
James O'Keefe wrote at 2005-5-23 22:36 -0400: >We would like to expand on that form such that a user can enter their email >address and zip code which we would log to our database and then call the url >to >subscribe the person in the mailman list. The easiest way it to perform a redirect. Unfortunately, HTTP allows automatic redirects only for "GET" requests. But, if you can live with "GET", then it is very easy. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Create a list using DTML.
Fernando Lujan wrote: Hi, I have a array data type in my DB wich have the following format : {1,2,3} ( ids_test ). Now in my web application, I have a multiple select wich options must be marked as selected if the number is in the array described above. How can I make the above format be converted to a list of elements? For instance: selected="true"> Thanks. Fernando Lujan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) Fernando, I think you are close. Change to ? David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to import win32com in external method
--On Dienstag, 24. Mai 2005 14:16 Uhr -0400 Wei He <[EMAIL PROTECTED]> wrote: Hi, I tried to import win32com in external method, but it always displays Error Type: ImportError Error Value: No module named win32com It's ok in python command line but never works in external method. Are you sure that you are using the *same* Python interpreter in both cases? In any case you should verify your PYTHONPATH, sys.path etc. -aj pgph1gGwhbXP4.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How to import win32com in external method
Hi, I tried to import win32com in external method, but it always displays Error Type: ImportError Error Value: No module named win32com It's ok in python command line but never works in external method. Is there a way to do this? Thanks. Wei He ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Create a list using DTML.
Hi, I have a array data type in my DB wich have the following format : {1,2,3} ( ids_test ). Now in my web application, I have a multiple select wich options must be marked as selected if the number is in the array described above. How can I make the above format be converted to a list of elements? For instance: selected="true"> Thanks. Fernando Lujan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Where can I found "hot_plug" function of zpi.zope ?
Hi Stépahne, I search the definition of "hot_plug" function. I look it at "CMFQuickInstallerTool/QuickInstallerTool.py" file. The line code is that : from zpi.zope import not_installed, hot_plug I not found hot_plug function in my Product/ directory and not in Zope source. Where can I found it ? I don't know where the function is, but if you are using linux you could try: % grep -r "def hot_plug" *.py and in windows, just use the Built-in search feature and introduce as filename "*.py" and in the text field insert "def hot_plug" Regards, Josef ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HTML post processing in Zope
Dne čtvrtek, 5. května 2005 04:58 Cyrille Bonnet <[EMAIL PROTECTED]> napsal(a): > Hi all, > > I am trying to perform a post-processing on all HTTP responses, before > they get sent to the browsers. I am using Zope 2.7.3 nad Plone 2.0.5. > > I had a look at the ZServer class: it seems to be the right place, but I > don't understand all the code there and I am afraid to break something :-( > > Am I on the right tracks there? Could someone with great Zope knowledge > be kind enough to point out which method I should change? (I want to > change the HTML content, not the headers). I have unitws product (from somebody else) which does modifications on the resulted html code. It is able to do any modifications, I was modify them to do wml compliant national characters and more. You call it simple with your content here Place this file __init__.py into "unitws" folder of your Products: # cat /var/zope/lib/python/Products/unitws/__init__.py from string import split, strip, join, find import DocumentTemplate.DT_Util from DocumentTemplate.DT_String import String class UnitWhitespaceTag: """ Removes redundant whitespace (not very conservatively) """ name='unitws' blockContinuations=() def __init__(self, blocks): tname, args, section = blocks[0] args = DocumentTemplate.DT_Util.parse_params(args) self.blocks = section.blocks def render(self,md): a = [] for line in split(DocumentTemplate.DT_Util.render_blocks(self.blocks, md),'\n'): line = strip(line) if line: b = [] for word in split(line,' '): if word!='': b.append(strip(word)) a.append(join(b,' ')) return join(a,'\n') __call__=render String.commands['unitws']=UnitWhitespaceTag -- Jaroslav Lukesh --- This e-mail can not contain any viruses because I use Linux ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Generatiing Lists with DTML.
Hi, I have a array data type in my DB wich have the following format : {1,2,3} ( ids_test ). Now in my web application, I have a multiple select wich options must be marked as selected if the number is in the array described above. How can I make the above format be converted to a list of elements? For instance: selected="true"> Thanks. Fernando Lujan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Where can I found "hot_plug" function of zpi.zope ?
Hi, I search the definition of "hot_plug" function. I look it at "CMFQuickInstallerTool/QuickInstallerTool.py" file. The line code is that : from zpi.zope import not_installed, hot_plug I not found hot_plug function in my Product/ directory and not in Zope source. Where can I found it ? Thanks for your help -- Stéphane ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Underscoring Inaugural Address
Hey, I am working on a subversion interface for zope, and our repositories are rife with files like "__init__.py". I ended up using the query string work around (but just for files). Best, Dan -Original Message- From: Chris Withers [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 24, 2005 8:46 AM To: Dan Pozmanter Cc: Paul Winkler; zope@zope.org Subject: Re: [Zope] Underscoring Inaugural Address Dan Pozmanter wrote: > Is sort of do, since the final object is a wrapper around a unique path. > > What about messing aroound with the url? > > Is there a way to have it show: > > http://foo.com/__init__.py > Maybe I missed something, but why are you intent on serving such bizare urls? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Underscoring Inaugural Address
Dan Pozmanter wrote: Is sort of do, since the final object is a wrapper around a unique path. What about messing aroound with the url? Is there a way to have it show: http://foo.com/__init__.py Maybe I missed something, but why are you intent on serving such bizare urls? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZODB question
Pascal Peregrina wrote: In a Zope / Zeo configuration (2.7.6), is there a way, on the Zope instance, to know when the database (Zeo) was last packed ? Publicly, maybe not, but there'll definitely be away to find it out since the pack machinery checks this. zodb-dev@zope.org may be the place to ask... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] "Save Changes" executes Python script
Bert Vanderbauwhede wrote: Yes. Every POST to save the changes is followed by a GET to the same object. The POST has status 200 - OK, while the GET has status 204 - No Content. This explains why the script is executed. It seems that we're not the only one with this problem: http://www.gossamer-threads.com/lists/zope/users/182655 As I said then, though, I've never been able to definitely reproduce this :-S Do you have any firefox plugins installed? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: how to accumulate data using ZPT
Am Dienstag, den 24.05.2005, 04:09 -0700 schrieb prabuddha ray: > sorry, > i missed the xplanaition. > i think this'll explain... > python:context.getPenalty(group_code=gcode,item_code=icode); > penaltylen python:test(len(penalty)==0)> > > so not:penaltylen ensures that unit_cost is present for this row. > > anyway i think this worked finally : > > > > > > Why dont you write this as plain python code? Python Scripts are made for that. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: how to accumulate data using ZPT
sorry, i missed the xplanaition. i think this'll explain... so not:penaltylen ensures that unit_cost is present for this row. anyway i think this worked finally : thanks deepak On 5/24/05, Deepak <[EMAIL PROTECTED]> wrote: > > What r those "penaltylen" and "penalty"? and also can u tell us y u r > checking "not:penaltylen"? > > regards, > Deepak > > prabuddha ray wrote: > > > ok this is again freaky on my part. > > > >my problem still remains intact .as i've told earlier, > >in my ZPT I needed to find a way to sum up column values > >if they are present and print the total at the last row. > > > >I tried this as a Deepak pal tipped : > > > > tal:content="python:penalty[0].unit_cost"/> > > > > Total > > > > but what happens is obvious , for reports where even one row has the > >unitcost missing followiing error comes up: > > > >"tuple indx out of range" > > > >when i changed tghe span tgs alike this : > > > > tal:content="python:penalty[0].unit_cost"> > > > > > > > >no error was there but the total remained 0. > > > >No ZSQLmethod can be used to get the sum coz its pretty complex. > > > > so plz rethink the code I'm also trying hard. > > hope for a reply soon > > > > > > > >>On 5/20/05, Deepak <[EMAIL PROTECTED]> wrote: > >> > >> > >>>Hi Prabuddha, > >>> > >>>check this ... > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>>thanks, > >>> > >>>Deepak ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope3 DTML in Filesystem ZSQL
On 5/19/05, Dieter Maurer <[EMAIL PROTECTED]> wrote: > Lennart Regebro wrote at 2005-5-19 10:39 +0200: > > ... > >But, at the moment, only for ascii, because the some Zope 3 widgets > >make unicode(string) calls for no apparent reason, which fails under > >Five if the string contains anything above chr(128). We are looking at > >solving that though. ;) > > One (probably not optimal) solution would be to use > "sys.setdefaultencoding(some_appropriate_encoding_fitting_the_sites_encoding)" > in "sitecustomize.py". Yes, (with a leading import sys) this works if you put sitecustomize.py in the lib/python directory. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] restrictedTraverse([''])
Thanks very much for the clarification. Lennart Regebro wrote: On 5/24/05, Hong Yuan <[EMAIL PROTECTED]> wrote: I happened to find that obj.restrictedTraverse(['']) returns the application object, instead of the object itself. This is quite unexpected, as both obj.restrictedTraverse('') and obj.restrictedTraverse([]) returns the object itself. Is this a bug or a feature? RestrictedTraverse on a list will assume it is a path of ids. restrictedTraverse on a string will assume it is a URL. A path of ids that starts with '' is a absolute path, just like a URL that starts with '/'. So, the path list [''] means the root/application object, just like '/' means the root/application object. However [] is an empty path, and is therefore the same as the URL ''. So, the above behaviour is expected and as defined. -- HONG Yuan Homemaster Trading Co., Ltd. No. 601, Bldg. 41, 288 Shuangyang Rd. (N) Shanghai 200433, P.R.C. Tel: +86 21 55056553 Fax: +86 21 55067325 E-mail: [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] restrictedTraverse([''])
On 5/24/05, Hong Yuan <[EMAIL PROTECTED]> wrote: > I happened to find that obj.restrictedTraverse(['']) returns the > application object, instead of the object itself. This is quite > unexpected, as both obj.restrictedTraverse('') and > obj.restrictedTraverse([]) returns the object itself. > > Is this a bug or a feature? RestrictedTraverse on a list will assume it is a path of ids. restrictedTraverse on a string will assume it is a URL. A path of ids that starts with '' is a absolute path, just like a URL that starts with '/'. So, the path list [''] means the root/application object, just like '/' means the root/application object. However [] is an empty path, and is therefore the same as the URL ''. So, the above behaviour is expected and as defined. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: HTML post processing in Zope
Hi there, I only joined up a few weeks ago, so I missed the beginning of the thread, but I just thought I'd let you know that the __ac_name and __ac_password don't stop your page from validating. I thought this may be a HTML 4.01 quirk (it's been a while...) so I tested it on a dummy page and it validates fine. I'll enclose the html at the end of this. One thing that it could be is if you give your input fields the same id as the name attribute - it would very probably "unvalidate" it. IDs are much more specific: you can't start one with a number either... The good news is, you don't have to use this __ac_nonsense as the id - I use "username" and "password" and it works very nicely (and it's easier for other people to read). I actually just use a plain exUserFolder, rather than Plone, but it uses the same form variables, so I assume it's similar. Cheers, Tom HTML: http://www.w3.org/TR/html4/loose.dtd";> Log in test page Skip navigation title="click here to login" id="loginexpander">src="images/Plus_icon.gif" alt="log in" id="loginicon">class="loginlink">LOG IN Username Password lost password? find out more join now Praedium quod primum siet, si me rogabis, sic dicam: de omnibus agris optimoque loco iugera agri centum, vinea est prima, vel si vino multo est. secundo loco hortus irriguus. tertio salictum. quarto oletum. quinto pratum. sexto campus frumentarius. septimo silva caedua. octavo arbustum. nono glandaria silva. On 23 May 2005, at 22:20, Cyrille Bonnet wrote: Hi Chris, Well, you'd better believe it :-) It works for me so far. But if you have specific examples that I can use to improve the filter, they would be very welcome. Two additional things that I had to do to be HTML 4.01 compliant: * replace with (remove the namespace information) * remove the login portlet: Plone uses form parameters __ac_name and __ac_password, which the W3C validator rejects as invalid. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: how to accumulate data using ZPT
What r those "penaltylen" and "penalty"? and also can u tell us y u r checking "not:penaltylen"? regards, Deepak prabuddha ray wrote: ok this is again freaky on my part. my problem still remains intact .as i've told earlier, in my ZPT I needed to find a way to sum up column values if they are present and print the total at the last row. I tried this as a Deepak pal tipped : Total but what happens is obvious , for reports where even one row has the unitcost missing followiing error comes up: "tuple indx out of range" when i changed tghe span tgs alike this : no error was there but the total remained 0. No ZSQLmethod can be used to get the sum coz its pretty complex. so plz rethink the code I'm also trying hard. hope for a reply soon On 5/20/05, Deepak <[EMAIL PROTECTED]> wrote: Hi Prabuddha, check this ... thanks, Deepak prabuddha ray wrote: sorry for delay, but the options you gave are ruled out. actually not all the rows in the column have the values. further the total i'm looking for will result in a very complex query that i dont want to do onsidering the no. of rows are high. I just need something like a var in my ZPT which can just sum up the values if they are present. value's prsence i'm checking using tal:condition but how to add the value repeatedly in the sum var. kindly help. On 5/20/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: Am Freitag, den 20.05.2005, 10:36 +0100 schrieb Hugo Ramos: On 5/20/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: Am Freitag, den 20.05.2005, 09:52 +0100 schrieb Hugo Ramos: Yellow, What DBMS are you using??? MySQL??? If so just have a sql method do this: == SELECT COUNT( '*' ) AS total >FROM yourtable == Are you sure about the ' '? looks strange. It works both ways... With or without the ' ' ! well. another reason to avoid mysql I guess ;) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: how to accumulate data using ZPT
ok this is again freaky on my part. my problem still remains intact .as i've told earlier, in my ZPT I needed to find a way to sum up column values if they are present and print the total at the last row. I tried this as a Deepak pal tipped : Total but what happens is obvious , for reports where even one row has the unitcost missing followiing error comes up: "tuple indx out of range" when i changed tghe span tgs alike this : no error was there but the total remained 0. No ZSQLmethod can be used to get the sum coz its pretty complex. so plz rethink the code I'm also trying hard. hope for a reply soon > On 5/20/05, Deepak <[EMAIL PROTECTED]> wrote: > > > > Hi Prabuddha, > > > > check this ... > > > > > > > > > > > > > > > > thanks, > > > > Deepak > > > > prabuddha ray wrote: > > > > >sorry for delay, > > > but the options you gave are ruled out. > > >actually not all the rows in the column have the values. > > >further the total i'm looking for will result in a very complex query > > >that i dont want to do onsidering the no. of rows are high. > > > > > > I just need something like a var in my ZPT which can just sum up the > > >values if they are present. > > >value's prsence i'm checking using tal:condition but how to add the > > >value repeatedly in the sum var. > > > > > >kindly help. > > > > > > > > > > > >On 5/20/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > > > > > > > > >>Am Freitag, den 20.05.2005, 10:36 +0100 schrieb Hugo Ramos: > > >> > > >> > > >>>On 5/20/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > > >>> > > >>> > > Am Freitag, den 20.05.2005, 09:52 +0100 schrieb Hugo Ramos: > > > > > > >Yellow, > > > > > >What DBMS are you using??? MySQL??? > > >If so just have a sql method do this: > > >== > > >SELECT COUNT( '*' ) AS total > > >FROM yourtable > > >== > > > > > > > > Are you sure about the ' '? looks strange. > > > > > > >>>It works both ways... With or without the ' ' ! > > >>> > > >>> > > >>> > > >>well. another reason to avoid mysql I guess ;) > > >> > > >> > > >> > > >> > > >> > > >> > > > > > > > > > > > > > > > > > > > -- Share the vision of difference with ME ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] restrictedTraverse([''])
I happened to find that obj.restrictedTraverse(['']) returns the application object, instead of the object itself. This is quite unexpected, as both obj.restrictedTraverse('') and obj.restrictedTraverse([]) returns the object itself. Is this a bug or a feature? -- HONG Yuan Homemaster Trading Co., Ltd. No. 601, Bldg. 41, 288 Shuangyang Rd. (N) Shanghai 200433, P.R.C. Tel: +86 21 55056553 Fax: +86 21 55067325 E-mail: [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )