[Zope] Passing parameters using DTML

2005-06-17 Thread John Poltorak
Can someone provide an example of passing parameters using DTML? I'm sure this must be doable, but don't see an example in the Zope Book. I assume it would go something like but how would var1 pick up parm1 parm2? -- John ___ Zope maillist - Z

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Tino Wildenhain
Am Freitag, den 17.06.2005, 09:44 +0100 schrieb John Poltorak: > Can someone provide an example of passing parameters using DTML? > > I'm sure this must be doable, but don't see an example in the Zope Book. > > I assume it would go something like > > > > but how would var1 pick up parm1 parm2?

[Zope] automagic reindexing of objects

2005-06-17 Thread Jürgen Herrmann
hi all! i make heavy use of indexes in my extension classes. these all inherit from catalogpathaware, so i have to call object.reindex_object() on each changed instance. calling it from attribute getters/setters f.ex. is not a good idea, because changing 3 attributes will reindex the object 3 time

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Jonathan
- Original Message - From: "Jürgen Herrmann" <[EMAIL PROTECTED]> i make heavy use of indexes in my extension classes. these all inherit from catalogpathaware, so i have to call object.reindex_object() on each changed instance. calling it from attribute getters/setters f.ex. is not a goo

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Jürgen Herrmann
[ Jonathan wrote:] > > - Original Message - > From: "Jürgen Herrmann" <[EMAIL PROTECTED]> >> i make heavy use of indexes in my extension classes. these all inherit >> from catalogpathaware, so i have to call object.reindex_object() on >> each changed instance. calling it from attribute get

[Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
Hi! I am new to this list and rather new to Zope, so maybe this is a stupid question; unfortunately I haven't been able to find an answer to it anywhere: is there a generic way to find out from Python code which method has been called (in other words: find out where the current method is located

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Peter Bengtsson
Personally I think one should stay the hell away from transactions. They're not for you to fiddle with. I understand your question and even though I think it's a bit crazy I can see a benefit (simplicity for the programmer). How about a trickery solution like this: class CatalogPathAware: def

Re: [Zope] Getting information about current method

2005-06-17 Thread Peter Bengtsson
On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > Hi! > > I am new to this list and rather new to Zope, so maybe this is a > stupid question; unfortunately I haven't been able to find an answer > to it anywhere: > > is there a generic way to find out from Python code which method has > bee

Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
I want to know the name (and path) of the _External Method_ from inside it. What I _can_ get is the name of the DTML method. I want to build generic scaffolding code for functions that conditionally redispatch as asynchronous calls (via ZASync); that part, however, isn't a problem at all - everyth

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Jürgen Herrmann
[ Peter Bengtsson wrote:] > Personally I think one should stay the hell away from transactions. > They're not for you to fiddle with. > I understand your question and even though I think it's a bit crazy I > can see a benefit (simplicity for the programmer). > > How about a trickery solution like

[Zope] Call of TAL interpreter

2005-06-17 Thread Simon ALEXANDRE
Hello   Someone could tell me where I could find in Zope the following call :   from TALInterpreter import TALInterpreter   thanks a lot ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts

Re: [Zope] Call of TAL interpreter

2005-06-17 Thread Andreas Jung
--On 17. Juni 2005 17:12:19 +0200 Simon ALEXANDRE <[EMAIL PROTECTED]> wrote: Hello Someone could tell me where I could find in Zope the following call : from TALInterpreter import TALInterpreter grep -r "from TALInterpreter import TALInterpreter" * is your friend. -aj pgpHYkrVwF

[Zope] Picking up a parameter in a ZPT

2005-06-17 Thread John Poltorak
I'm trying to work out how to pass parameters between various modules running under Zope and have got stuck. In the line below, I need to replace the word 'links' with a variable passed by the calling program python:here.parse_file(file=context.links,sepr=',',clone=1)"> I know I can pass th

Re: [Zope] Getting information about current method

2005-06-17 Thread Peter Bengtsson
Then, in your External method, try:: import inspect print inspect.stack()[1] On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > I want to know the name (and path) of the _External Method_ from > inside it. What I _can_ get is the name of the DTML method. > > I want to build generic scaf

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Peter Bengtsson
On 6/17/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: > > [ Peter Bengtsson wrote:] > > Personally I think one should stay the hell away from transactions. > > They're not for you to fiddle with. > > I understand your question and even though I think it's a bit crazy I > > can see a benefit (simp

Re: [Zope] Picking up a parameter in a ZPT

2005-06-17 Thread Peter Bengtsson
Try python:here.parse_file(file=options['parm'],sepr=',',clone=1)"> On 6/17/05, John Poltorak <[EMAIL PROTECTED]> wrote: > > I'm trying to work out how to pass parameters between various modules > running under Zope and have got stuck. > > In the line below, I need to replace the word 'links' wi

Re: [Zope] Picking up a parameter in a ZPT

2005-06-17 Thread Andreas Jung
--On 17. Juni 2005 16:19:46 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: I'm trying to work out how to pass parameters between various modules running under Zope and have got stuck. In the line below, I need to replace the word 'links' with a variable passed by the calling program python

Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
Unforunately, this just gives me the pythonic path to the method; what I need for a TALES expression is the ZOPE path - i.e. what I get from the stack frame is ... E:\zope\Extensions\req.py ... but what I need is ... http://localhost:8080/ReqTest ... Ole 2005/6/17, Peter Bengtsson <[EMAIL PROTEC

[Zope] Using Catalog in a stand-alone application

2005-06-17 Thread Noam Raphael
Hello, I intend to write a free (GPL) application for browsing and searching a large collection of classic Hebrew texts, such as the bible. I want to write it in Python, which is a language that I like very much. It is supposed to be a stand-alone application, which could be distributed on a CD.

Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
No, I'm sorry; I only get system paths. Ole 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>: > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > > Unforunately, this just gives me the pythonic path to the method; what > > I need for a TALES expression is the ZOPE path - i.e. what I get fro

Re: [Zope] Using Catalog in a stand-alone application

2005-06-17 Thread Jonathan
- Original Message - From: "Noam Raphael" <[EMAIL PROTECTED]> I intend to write a free (GPL) application for browsing and searching a large collection of classic Hebrew texts, such as the bible. I want to write it in Python, which is a language that I like very much. It is supposed to be

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Paul Winkler
On Fri, Jun 17, 2005 at 02:19:26PM +0200, J?rgen Herrmann wrote: > hi all! > > i make heavy use of indexes in my extension classes. these all inherit > from catalogpathaware, so i have to call object.reindex_object() on > each changed instance. calling it from attribute getters/setters f.ex. > is

Re: [Zope] Getting information about current method

2005-06-17 Thread Peter Bengtsson
On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > No, I'm sorry; I only get system paths. > And what about REQUEST.PARENTS? (or is that just the http request) > Ole > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>: > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > > > Un

Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
It's an application instance wrapped in a list; it seems to be identical to self, actually - self.REQUEST['URL'] and self.REQUEST.PARENTS[0].REQUEST['URL'] are the same. However, the two REQUESTs are not the identical object (== returns False). Ole 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:

Re: [Zope] Getting information about current method

2005-06-17 Thread Peter Bengtsson
On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > It's an application instance wrapped in a list; it seems to be > identical to self, actually - self.REQUEST['URL'] and > self.REQUEST.PARENTS[0].REQUEST['URL'] are the same. However, the two > REQUESTs are not the identical object (== returns

Re: [Zope] Python Scripts

2005-06-17 Thread Dieter Maurer
Dennis Allison wrote at 2005-6-16 09:06 -0700: >We have been seeing a number of instances where python scripts fail due to >an apparent "syntax error" but the syntax is correct and simply storing >the method restores it to functionality. Anyone else seeing this? I saw this today. I expect DOS

Re: [Zope] IE v. Firefox for viewing Zope sites

2005-06-17 Thread Dieter Maurer
John Poltorak wrote at 2005-6-16 22:33 +0100: > ... >I was advised to change > > > >to > >http://www.mysite.org/"; /> > >and that seemed to sort out most of the problems. You should not fiddle with the "base" tag (unless you precisely (!) know what you are doing). Zope sets it automatically wh

Re: [Zope] automagic reindexing of objects

2005-06-17 Thread Dieter Maurer
Jürgen Herrmann wrote at 2005-6-17 14:19 +0200: >i make heavy use of indexes in my extension classes. these all inherit >from catalogpathaware, so i have to call object.reindex_object() on >each changed instance. calling it from attribute getters/setters f.ex. >is not a good idea, because changing

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Dieter Maurer
Tino Wildenhain wrote at 2005-6-17 10:57 +0200: > ... >Not at all. You could either have tried >it out ;) Or looked at the DTML documentation >in the Zope book *wink* ;) > > Be warned: this is likely to cause loss of the namespace. Do not forget to pass the two positional arguments (usually as "No

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Tino Wildenhain
Am Freitag, den 17.06.2005, 19:09 +0200 schrieb Dieter Maurer: > Tino Wildenhain wrote at 2005-6-17 10:57 +0200: > > ... > >Not at all. You could either have tried > >it out ;) Or looked at the DTML documentation > >in the Zope book *wink* ;) > > > > > > Be warned: this is likely to cause loss of

[Zope] Blank page problem

2005-06-17 Thread Mike
Hello All, I'm currently running an intranet site using Zope and Plone and our users have been experiencing a very large number of blank pages (view source shows the html, head, and body tag, but that's it) on our site. From what I can tell, nothing relevent is appearing in the logs and a

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread John Poltorak
On Fri, Jun 17, 2005 at 07:09:04PM +0200, Dieter Maurer wrote: > Tino Wildenhain wrote at 2005-6-17 10:57 +0200: > > ... > >Not at all. You could either have tried > >it out ;) Or looked at the DTML documentation > >in the Zope book *wink* ;) > > > > > > Be warned: this is likely to cause loss of

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Andreas Jung
--On 17. Juni 2005 20:24:23 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: Is there also something which explains how to call ZPTs from a DTML object? Do you have a good reason for mixing ZPT and DTML? -aj pgphTjDYprDSb.pgp Description: PGP signature ___

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread John Poltorak
On Fri, Jun 17, 2005 at 09:31:44PM +0200, Andreas Jung wrote: > > > --On 17. Juni 2005 20:24:23 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: > > Is there also something which explains how to call ZPTs from a DTML > > object? > > > > Do you have a good reason for mixing ZPT and DTML? Yes. I h

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Andreas Jung
--On 17. Juni 2005 20:40:14 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: spending a few months learning something entirely different which only gurus can handle. This refers to what? -aj pgpRdMhEJ5aC2.pgp Description: PGP signature ___ Zope m

Re: [Zope] Picking up a parameter in a ZPT

2005-06-17 Thread Peter Bengtsson
On 6/17/05, John Poltorak <[EMAIL PROTECTED]> wrote: > On Fri, Jun 17, 2005 at 04:33:28PM +0100, Peter Bengtsson wrote: > > Try > > python:here.parse_file(file=options['parm'],sepr=',',clone=1)"> > > Thanks for the suggestion, but I need to get the 'context' keyword in > there. > No. "context" i

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread J Cameron Cooper
John Poltorak wrote: On Fri, Jun 17, 2005 at 07:09:04PM +0200, Dieter Maurer wrote: Tino Wildenhain wrote at 2005-6-17 10:57 +0200: ... Not at all. You could either have tried it out ;) Or looked at the DTML documentation in the Zope book *wink* ;) Be warned: this is likely to cause l

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Paul Winkler
On Fri, Jun 17, 2005 at 08:24:23PM +0100, John Poltorak wrote: > Is there also something which explains how to call ZPTs from a DTML > object? > > I'm unable to pick up a passed parameter. > > This is what I've conjured up:- > > python:here.lib.parse_file(file=context.options['parm'],sepr=',',cl

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread John Poltorak
On Fri, Jun 17, 2005 at 05:07:32PM -0400, Paul Winkler wrote: > On Fri, Jun 17, 2005 at 08:24:23PM +0100, John Poltorak wrote: > > Is there also something which explains how to call ZPTs from a DTML > > object? > > > > I'm unable to pick up a passed parameter. > > > > This is what I've conjured u

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread J Cameron Cooper
John Poltorak wrote: On Fri, Jun 17, 2005 at 05:07:32PM -0400, Paul Winkler wrote: On Fri, Jun 17, 2005 at 08:24:23PM +0100, John Poltorak wrote: Is there also something which explains how to call ZPTs from a DTML object? I'm unable to pick up a passed parameter. This is what I've conjured

Re: [Zope] Passing parameters using DTML

2005-06-17 Thread Paul Winkler
On Fri, Jun 17, 2005 at 11:25:30PM +0100, John Poltorak wrote: > This is what I have:- > > > > I wish to get 'myobjectname' into this line in 'testlist' which is marked > with * > > python:here.parse_file(file=context.**,sepr=',',clone=1)"> > > There must be a simple way of doing