Re: [Zope] REPOST: dtml-with doesn't work

2001-01-14 Thread Shai Berger
Philip has already made it clear that this was not his problem, but still, Dieter Maurer wrote: Just a remark: SQL methods do *NOT* look at the DTML namespace *AT ALL*, just at REQUEST (or the expliciitly passed keyword arguments). Thus, "dtml-with", "dtml-let" and friends are

[Zope] DCOracle bug?

2001-01-14 Thread Shai Berger
Hi guys, As I have written before, we are using DCOracle 1.3.2 / Oracle 8.0.5 on a Linux/i386. We need some LONG RAW columns, and we hold them in a special table long_data, with two columns, long_id (int) and long_data (long raw). Other tables where long data is needed hold references to this

Re: [Zope] reindex when a zclass is edited

2001-01-14 Thread Aleksander Salwa
On Sat, 13 Jan 2001, Tim Hicks wrote: Thanks very much for the help Aleksander, but when I drop your code into my method, it doesn't work (it doesn't break either). I simply copied and pasted your code, then edited the final redirect at the bottom. Here is the submission part of my edit

[Zope] PrincipiaSearchSource() dtml-method and Catalog

2001-01-14 Thread Max M
I have made a dtml method called "PrincipiaSearchSource" in a bunch of zClasses so that my Catalog will index severeal parameters in the zClass, but nothing happens. As far as I can see PrincipiaSearchSource is a default value that is indexed in catalog. Have I misunderstood that? The title

Re: [Zope] PrincipiaSearchSource() dtml-method and Catalog

2001-01-14 Thread Geir Bækholt
PrincipiaSearchSource will have to be a PythonMethod or an External Method. dtml won't be called by Catalog... Anything Python will work. so instead of : dtml-return "var1 + var2 +var3" , you have to use : return var1 + var2 + var3 -- Geir Bkholt web-developer/designer [EMAIL PROTECTED]

[Zope] Raw post data

2001-01-14 Thread Shai Berger
Hi guys, For several reasons, I would like to have direct access to raw posted data in my dtml-code (an analogue of QUERY_STRING). Can anyone please show me the light? Thanks, Shai. ___ Zope maillist - [EMAIL PROTECTED]

Re: [Zope] Raw post data

2001-01-14 Thread Steve Spicklemire
Hi Shai, This external method works for me. -steve -- def getRawInput(self, REQUEST): meth = REQUEST.environ.get('REQUEST_METHOD','GET') if meth != 'GET': REQUEST.stdin.seek(0) result =

[Zope] Re: [Skinscript] unable to update property

2001-01-14 Thread Steve Spicklemire
Hi Dirksen, I think that WHEN OBJECT CHANGED is used when some code tries to change a DataSkin attribute and you need to update some external source. So... an appropriate thing to do would be to call an SQL method, or talk to another Specalist which needs to be notified .. etc. I think that

[Zope] convert a String ...

2001-01-14 Thread Marc Fischer
Hi, how is it possible to convert a string into my own zclass type? I get a String from a form and want to do some operation like string.manage_addFile(... on it. So what to do ??? Perhaps some out there is able to help ... Thanks, Marc ___ Zope

[Zope] ZMySQLDA, Problems Connecting

2001-01-14 Thread Steve McMahon
Greetings Zopers, I'm attempting to make connections between Zope and MySQL using MySQL-python 0.3.0 and ZMySQLDA 2.01. The Python/MySQLdb side is working. I can use "connect(db='test')" or "connect(db='test', user='guest', passwd='token')" -- where guest and token are a MySQL username and

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Jim Washington
Hi, Tim I am not working through that example, but the below is a start on what you seem to need. Let me know what you think. good luck! -- Jim Washington *** You probably want the work to be done in the context of an instance of the class, so assure you

RE: [Zope] hasRole bug or feature in 2.2.?

2001-01-14 Thread Dieter Maurer
Ron Bickers writes: I think I understand, but correct me if I'm wrong. The problem is that my browser is not even *sending* the authentication information to the other parts of the site until I first access a protected document at the root level. That is, the browser only continues to

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Evan Simpson
From: "Jim Washington" [EMAIL PROTECTED] I am not working through that example, but the below is a start on what you seem to need. Let me know what you think. Thanks for the fine examples! I have only one nit to pick; When using Scripts in ZClasses, you will typically want to use 'container',

Re: [Zope] convert a String ...

2001-01-14 Thread Peter Bengtsson
To "convert" a string to an object, you use the getitem() function. ## example 1: Your: dtml-var last_name #returns: Your: Peter Bengtsson ## example 2: dtml-call "REQUEST.set('var_to_go_and_get','last_name')" Your: dtml-var "_.getitem(var_to_go_and_get)" # returns: Your: Peter Bengtsson

[Zope] renaming python input params in DTML

2001-01-14 Thread Lee
Hi, I am having a problem passing in a variable to a Python method, which is obtained from the REQUEST object - I'd really appreciate someone's insight into how to correctly go about this. I have a form that submits a parameter named '9728430xp0xclasstest' with a value = 7 to a DTML method. I

RE: [Zope] renaming python input params in DTML

2001-01-14 Thread Randall F. Kern
You can't use DTML tags inside an expr="" attribute; the value of expr is python code. To access the sequence-item variable from python, you need: _['sequence-item'] So, try something like this (untested): dtml-in expr="REQUEST.form.items()" dtml-in expr="testSQL(text=_['sequence-key']

Re: [Zope] Raw post data

2001-01-14 Thread Dieter Maurer
Shai Berger writes: For several reasons, I would like to have direct access to raw posted data in my dtml-code (an analogue of QUERY_STRING). Can anyone please show me the light? "REQUEST['BODY']" may work. Dieter ___ Zope maillist - [EMAIL

Re: [Zope] TREE tag - not showing Folderish objects that contain no sub-objects

2001-01-14 Thread Dieter Maurer
Kevin Howe writes: ... dtml-tree expr="PARENTS[-1]" branches_expr="objectValues()" sort=id ... What I would like to do is display these objects, but ONLY IF they currently contain some objects, so that if an object does not contain any subobjects at the moment, it is not displayed.

Re: [Zope] REPOST: dtml-with doesn't work

2001-01-14 Thread Dieter Maurer
I checked the sources Shai Berger writes: My experience is somewhat different: ZSQL methods in general *DO* look at the namespace just like normal DTML methods, with two exceptions: ZSQL methods do *NOT* look at the DTML(!) namespace. They do look at REQUEST or (exclusive) explicitly

Re: [Zope] convert a String ...

2001-01-14 Thread Dieter Maurer
Marc Fischer writes: how is it possible to convert a string into my own zclass type? I get a String from a form and want to do some operation like string.manage_addFile(... on it. So what to do ??? Perhaps some out there is able to help ... "_.getitem(string)" converts a string into an

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Timothy Wilson
On Sun, 14 Jan 2001, Jim Washington wrote: I am not working through that example, but the below is a start on what you seem to need. Let me know what you think. Thanks Jim. I will study the examples you provided. Do you suppose that the Zope Book would benefit from some examples of this type?

[Zope] RE: ZMySQLDA, Problems Connecting

2001-01-14 Thread Steve McMahon
...when I attempt to add a Z MySQL Database Connection to a folder, I get "Invalid connection string" -- no matter what the connection string Problem solved. It turned out there was a line of commented-out diagnostics on the page that reported "Invalid connection string." That let me know

[Zope] More than one condition indtml-if

2001-01-14 Thread Angietel
The following is my DTML code, purposely to valid the entry field and return the right sql method according to the situation:- dtml-if "_['dtml-var custname']!=""" AND "_['dtml-var custid']==""" dtml-in sqlSearchcust3#// if the custid is blank and custnameis not blank then will use

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Timothy Wilson
On Sun, 14 Jan 2001, Jim Washington wrote: You probably want the work to be done in the context of an instance of the class, so assure you have "context" bound to the Python Script on the "bindings" tab. It's bound by default. You might want to name the Script in a Zopish way to

[Zope] Searching method due to situation

2001-01-14 Thread Angietel
The following is my DTML code, purposely to valid the entry field and return the right sql Searching method according to the situation:- dtml-if "_['dtml-var custname']!=""" AND "_['dtml-var custid']==""" dtml-in sqlSearchcust3#// if the custid is blank and custnameis not blank then

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Jim Washington
Hi, Tim You will want to pass REQUEST to it so you can use it like the Zope builtins: containerName.CDInfoName.manage_changeCDProperties(REQUEST) So, put REQUEST in the parameters list. I'm afraid I'm a bit confused here. Is 'CDInfoName' the id of an instance of this CD class?

[Zope] Apache ProxyPass directive and REMOTE_ ENV

2001-01-14 Thread Denis
Hi, I'm confronted to the same problem as the one as discussed at that address : http://www.egroups.com/message/zope/43874?threaded=1 I'm trying to get back the REMOTE_ADDR variable because it's changed to the Server's address by a ProxyPass directive. I'm trying to use SetEnv or SetEnvIf

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Timothy Wilson
This seems to almost work. :-) On Sun, 14 Jan 2001, Jim Washington wrote: !dtml-var standard_html_header !dtml-if "REQUEST.form.has_key('editCD')" ! dtml-call "manage_changeCDProperties(REQUEST)" ! pfont color="red"Your changes have been saved/font/p !/dtml-if !form

[Zope] Calling other frames

2001-01-14 Thread Etienne Labuschagne
Hi there I have a navigation/sitemap object that shows the user where he is in the website at the current moment. I want this object eg. to sit in the left frame. This object must update every time the main (right) frame updates to reflect the position of the right frame. The website can be

Re: [Zope] Calling other frames

2001-01-14 Thread Dirksen
Hi Etienne, First of all, I don't think you can achieve that with javascript. As far as I know, neither IE nor Netscape allows javascript to access DOM objects of other frame page for security reasons. Therefore, to do it at backend is a good solution. Session is the thing you want.

Re: [Zope-dev] Massive scalability

2001-01-14 Thread Steve Alexander
Michael Bernstein wrote: I am currently planning two separate 'Archive' type projects/Products. In both cases, I need to make sure that my implementation will scale to hundreds of thousands or even millions of objects. In one project the objects are very simple ZClasses with a few

[Zope-dev] Tip: Skinscript Debugging

2001-01-14 Thread Steve Alexander
When debugging skinscript, especially tricky dependencies between what gets computed when during state changes, do the following: 1: Run zope in debug mode (-D) 2: Put an external method called print_ in the root of your ZODB, with the code: def print_(s): print s 3: In your

[Zope-dev] SkinScript enhancement

2001-01-14 Thread Steve Alexander
While debugging some dependencies in some of my SkinScript, I had an idea. SkinScript could be extended so that COMPUTE statements can have a RECOMPUTE FOR clause. This clause would tell a dataskin to invalidate its cache for the attributes in the COMPUTE statement if any of the attributes in

[Zope-dev] Re: SkinScript enhancement

2001-01-14 Thread Steve Alexander
Steve Alexander wrote: This assumes a method of DataSkins.DataSkin _uncache_attrs: def _uncache_attrs(self, names): v=self._v_attrCache for name in names: del v[name] I haven't tested any of this yet. And I realized just after I sent it that the method should be more

Re: [Zope-dev] Massive scalability

2001-01-14 Thread Michael Bernstein
Steve Alexander wrote: Michael Bernstein wrote: I am currently planning two separate 'Archive' type projects/Products. In both cases, I need to make sure that my implementation will scale to hundreds of thousands or even millions of objects. In one project the objects are very