[Zope] restrictedTraverse([''])

2005-05-24 Thread Hong Yuan
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

[Zope] Re: how to accumulate data using ZPT

2005-05-24 Thread prabuddha ray
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 : span tal:condition=not:penaltylen

[Zope] Re: how to accumulate data using ZPT

2005-05-24 Thread Deepak
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

Re: [Zope] restrictedTraverse([''])

2005-05-24 Thread Hong Yuan
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

[Zope] Re: how to accumulate data using ZPT

2005-05-24 Thread prabuddha ray
sorry, i missed the xplanaition. i think this'll explain... div tal:define= penalty 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

Re: [Zope] Re: how to accumulate data using ZPT

2005-05-24 Thread Tino Wildenhain
Am Dienstag, den 24.05.2005, 04:09 -0700 schrieb prabuddha ray: sorry, i missed the xplanaition. i think this'll explain... div tal:define= penalty python:context.getPenalty(group_code=gcode,item_code=icode); penaltylen python:test(len(penalty)==0) so not:penaltylen ensures

Re: [Zope] Save Changes executes Python script

2005-05-24 Thread Chris Withers
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:

Re: [Zope] ZODB question

2005-05-24 Thread Chris Withers
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

Re: [Zope] Underscoring Inaugural Address

2005-05-24 Thread Chris Withers
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

[Zope] Where can I found hot_plug function of zpi.zope ?

2005-05-24 Thread KLEIN Stéphane
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 ?

[Zope] Generatiing Lists with DTML.

2005-05-24 Thread Fernando Lujan
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

Re: [Zope] HTML post processing in Zope

2005-05-24 Thread Jaroslav Lukesh
Dne tvrtek, 5. kvtna 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,

[Zope] Re: Where can I found hot_plug function of zpi.zope ?

2005-05-24 Thread Josef Meile
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

[Zope] Create a list using DTML.

2005-05-24 Thread Fernando Lujan
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

Re: [Zope] Create a list using DTML.

2005-05-24 Thread David H
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

Re: [Zope] Can ZPT form call a url?

2005-05-24 Thread Dieter Maurer
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.

Re: [Zope] Finding an object in a folder

2005-05-24 Thread Dieter Maurer
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??

Re: [Zope] Hiding HTML URL

2005-05-24 Thread Jaroslav Lukesh
Dne ter, 10. kvtna 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,

Re: [Zope] Can ZPT form call a url?

2005-05-24 Thread Phillip Hutchings
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

Re: [Zope] Create a list using DTML.

2005-05-24 Thread Fernando Lujan
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

Re: [Zope] Create a list using DTML.

2005-05-24 Thread David H
Fernando Lujan wrote: I think you are close. Change dtml-if ids_test in ids_test to dtml-if "ids_test in ids_test" ? It's working like IN over a string, e.g. the [5,61] will make selected the number 5,6 and 61. dtml-call "REQUEST.set('ids_test', '(' + id_test[1:-1] + ')')"

[Zope] surprising interaction between Javascript and Zope

2005-05-24 Thread Dennis Allison
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=namsval=xxx;frm.submit(); which does the job except that

Re: [Zope] surprising interaction between Javascript and Zope

2005-05-24 Thread Phillip Hutchings
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:

[Zope] newbie question

2005-05-24 Thread Barry Drake
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

Re: [Zope] newbie question

2005-05-24 Thread Phillip Hutchings
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

Re: [Zope] newbie question

2005-05-24 Thread Barry Drake
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

Re: [Zope] newbie question

2005-05-24 Thread Phillip Hutchings
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

Re: [Zope] newbie question

2005-05-24 Thread Barry Drake
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

Re: [Zope] newbie question

2005-05-24 Thread J Cameron Cooper
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

Re: [Zope-DB] DCoracle2 - truncates UTF-8 string with national characters

2005-05-24 Thread Maciej Winiowski
Are you sure that this is a DCOracle2 problem and not a database problem? UTF-8 may need 5 times more bytes then the character length. Both DCOracle2 and Oracle may get this wrong. Queries from TOAD or sqlplus are returning correct results. I've tried to run sqlplus query as user Zope on the