Re: [Zope] Namespace for PythonScript
Hong Yuan wrote: If a PythonScript is called from a Page Template, how can it access the variables defined using: in the calling script? no need for the 'global' Go to the Bindings tab of your python script, make sure _ is in the box for "namespace". then, in the python script, you can do: _.getitem('...') 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] Namespace for PythonScript
Hong Yuan wrote at 2005-5-27 00:07 +0800: >If a PythonScript is called from a Page Template, how can it access the >variables defined using: > >in the calling script? It may work to bind the "namespace" binding. Not sure, though... -- 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] Namespace for PythonScript
Hong Yuan wrote: If a PythonScript is called from a Page Template, how can it access the variables defined using: in the calling script? Of course, one can pass the variables to the PythonScript explicitly as parameters, but is there any other way to let the PythonScript to easily access the name space of its calling page template? I very much doubt it. Pass it to the script, which is the right way. --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 )
[Zope] Namespace for PythonScript
Hello, If a PythonScript is called from a Page Template, how can it access the variables defined using: in the calling script? Of course, one can pass the variables to the PythonScript explicitly as parameters, but is there any other way to let the PythonScript to easily access the name space of its calling page template? Hong Yuan ___ 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] namespace problems
Gary Lowder wrote: > > When I use "context.REQUEST.RESPONSE.redirect(URL1)" in my python script > I get "NameError URL1". That should be: RESPONSE = context.REQUEST.RESPONSE URL1 = context.REQUEST['URL1'] RESPONSE.redirect(URL1) > When I bind _ as you suggested, and use "_.RESPONSE.redirect(URL1)" I > get "AttributeError RESPONSE". Try _['RESPONSE'].redirect(_['URL1']) errr... maybe DTML wasn't so bad afterall ;-) *sigh* 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] namespace problems
I really appreciate your help, but I continue to have problems with this line, and this is turning into a quest of sorts ;) . When I use "context.REQUEST.RESPONSE.redirect(URL1)" in my python script I get "NameError URL1". When I bind _ as you suggested, and use "_.RESPONSE.redirect(URL1)" I get "AttributeError RESPONSE". I'm confused, but very grateful for your help so far. Gary. Chris Withers wrote: > > > Chris Withers wrote: > > > > > > > How would I do the URL redirect using an equivalent to the > > > >that's in the DTML Method below? > > > > > > context.RESPONSE.redirect(URL1) > > D'Oh... > > Either replace it with: > > context.REQUEST.RESPONSE.redirect(URL1) > > ...or do the following: > > -Go to the bindings tab and bind _ to the Namespace. > -Then do _.RESPONSE.redirect(URL1) > > 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] namespace problems
> Chris Withers wrote: > > > > > How would I do the URL redirect using an equivalent to the > > >that's in the DTML Method below? > > > > context.RESPONSE.redirect(URL1) D'Oh... Either replace it with: context.REQUEST.RESPONSE.redirect(URL1) ...or do the following: -Go to the bindings tab and bind _ to the Namespace. -Then do _.RESPONSE.redirect(URL1) 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] namespace problems
with your line dropped in, my python script still gives me: Error Type: AttributeError Error Value: RESPONSE I'm passing variables via a , how do I let python access that namespace? Thanks, Gary. Chris Withers wrote: > > > How would I do the URL redirect using an equivalent to the > >that's in the DTML Method below? > > context.RESPONSE.redirect(URL1) > > 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] namespace problems
> How would I do the URL redirect using an equivalent to the >that's in the DTML Method below? context.RESPONSE.redirect(URL1) 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] namespace problems
As an aside: I can get the mess below to work with a python script, BUT, I don't know how to do the URL redirect with python as it's listed in the DTML Method. (python script snippet) context.manage_addFolder(name, name) doc=getattr(context, name) doc.manage_addProperty('number', number, 'int') doc.manage_addProperty('exp_date', exp_date, 'date') How would I do the URL redirect using an equivalent to the that's in the DTML Method below? Many thanks again for your time and effort. Gary. Gary Lowder wrote: > > I'm currently trying to add a new folder to an old folder, using input > from a calling form, then add two properties to that new folder. I > searched the mailing list, and came up with an example that led me to > the following, but I'm still getting "Error Type: NameError" "Error > Value: manage_addProperty". > > Where is my mistake? > > The following line works as expected. > > > > Something below here isn't right. > > >type='int')"> >type='date')"> > > > > > Thanks for you help! > Gary. > > ___ > 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] namespace problems
I'm currently trying to add a new folder to an old folder, using input from a calling form, then add two properties to that new folder. I searched the mailing list, and came up with an example that led me to the following, but I'm still getting "Error Type: NameError" "Error Value: manage_addProperty". Where is my mistake? The following line works as expected. Something below here isn't right. Thanks for you help! Gary. ___ 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] namespace clash with 'URL', any others?
Here for the HTML impaired: ;-) > "iap_y2fun.com" wrote: > > Hi, I can't set the ID of a instance to be "URL". > Once I create one, the folder which contains that object > will not work again under management view. > If you want to try by yourself, try in a non-critical folder > (a new one just for trying). Just create a new DTML Document > and set id to be 'URL'. > > Is this a bug or not? Looks like a bug to me, submit it to the collector: http://classic.zope.org:8080/Collector/ I wonder how many of these others share the same problem: -URL1, BASE1, etc -AUTHENTICATED_USER and other CGI-ish variables -etc ;-) I expect you could also get the same effect by creating properties with these names :-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] namespace-problem
Hi ! Alexander DePauli wrote: > > Hi everybody, > > what I want to do is fairly simple, but I've got a namespace problem: > > - via a form I want to add a new folder, add some properties to the new > folder, then add a DTML document within the new folder. > - whatever I try, the properties as well as the new document are added > to the parent folder of the new folder instead of to the new folder. This works for me: Best regards, Maik Röder ___ 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] namespace-problem
One (ugly!) way of doing it: This creates Test2 in Test1. Ivan > > Here some experiments (don't look at the syntax): > > > > > > > > > This looks fine to me, but ZOPE insists on creating the new document in >/OldFolder > instead of >/OldFolder/NewFolder > ___ 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] namespace-problem
Hi everybody, what I want to do is fairly simple, but I've got a namespace problem: - via a form I want to add a new folder, add some properties to the new folder, then add a DTML document within the new folder. - whatever I try, the properties as well as the new document are added to the parent folder of the new folder instead of to the new folder. Here some experiments (don't look at the syntax): This looks fine to me, but ZOPE insists on creating the new document in /OldFolder instead of /OldFolder/NewFolder Some more stuff for wondering: If I do a to get an actual value for testing purposes, ZOPE returns the *correct* value of 'NewFolder' But if I do an additional id: , type: to list the objects of the actual namespace (placed *after* the above , the output consists of the objects of the /OldFolder-namespace, but not that of the /OldFolder/NewFolder. ...I'm sure this is a rookie-problem and can be solved by turning a switch or two (perhaps in my brain), but I'm stuck. Do you/anybody has any clue? Thanks in advance - Alexander ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ 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: How to use standard html headers and footers properly (was: Re:[Zope] Namespace problems...)[Zope] Namespace problems...)
Hi, first, thanks for your advice! "Manuel Amador (Rudd-O)" schrieb: > > > > > > on your document, WILL work fine. > > But I suggest recreating standard_html_header as a METHOD and calling OK, once again: My standard_html_header is still a METHOD!!! And within it, I DO access to the variables of the calling document / method! > > > > That's _exactly_ what I did! I only inserted a to pass this var to standard_html_header. > > Since methods don't have properties, they will use calling object's > properties. Read again. Do NOT use DTML documents for headers and > footers. Use METHODS. I DON'T! >> So I stored my headers and footers and many other things in >> root/intra/pub. >> >> All the other documents are stored in root/intra and below. >> >> I've got my standard_html_header, with which I can display >> user-defined >> titles which may also contain values of global properties. The >> user-defined title is being built in the document before the header >> is >> called, e. g. something like: > Look above! >> In the standard_html_header !!!>>>_method_<<> whether there is a titel attribute or not. > >> This works fine. > >> But for general use I want to keep the possibility of displaying the >> >> title_or_id of the document when I don't introduce a user-defined >> title. >> >> This would be no problem if s_h_h wasn't situated in root/intra/pub, >> so I have >> to call it within the . >> >> But calling it within the , pub is on the top of my >> namespace, so that calling title_or_id returns the title_or_id of >> the container of s_h_h, i. e. >> pub, INSERTED: and not as wanted the title_or_id of the calling >> document! > >> How can I nevertheless access within the s_h_h to the title_or_id of >> my >> original document? INSERTED: i. e. explicitely accessing to a >> layer of the namespace which isn't on its top! > Hope I now explained it well enough. Thank you very much. Lars ___ 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 use standard html headers and footers properly (was: Re: [Zope]Namespace problems...)Namespace problems...)
on your document, WILL work fine. But I suggest recreating standard_html_header as a METHOD and calling Since methods don't have properties, they will use calling object's properties. Read again. Do NOT use DTML documents for headers and footers. Use METHODS. Lars Heber wrote: Hi there, I've still got to build a bigger website. So I stored my headers and footers and many other things in root/pub. All the other documents are stored in root/Intra and below. I've got my standard_html_header, with which I can display user-defined titles which may also contain values of global properties. The user-defined title is being built in the document before the header is called, e. g. something like: In the standard_html_header method I'm checking whether there is a titel attribute or not. This works fine. But for general use I want to keep the possibility of displaying the title_or_id of the document when I don't introduce a user-defined title. This would be no problem if s_h_h wasn't situated in root/pub, so I have to call it within the . But doing this, pub is on the top of my namespace, so that calling title_or_id returns the title_or_id of the container of s_h_h, i. e. pub! How can I nevertheless access within the s_h_h to the title_or_id of my original document? Thanks. Lars ___ 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 ) -- Manuel Amador (Rudd-O)
Re: [Zope] Namespace within a product... (argh...)
On Tue, Oct 10, 2000 at 11:56:11AM +0200, Pierre-Julien Grizel wrote: > > So - I had a look at DTMLDocument.py and saw the following method : > > def __call__ (self, client = None, REQUEST = {}, **kw): > ... > > SO - I try to create this method for my product : > > def __call__ (self, client = None, REQUEST = {}, **kw): > print client > print REQUEST > > > and it prints : > None > {} > > > It seems that in fact the DTML document doesn't actually pass _.None and > _ to my object. WHY ?? Evan already answered, but the short story is: your object needs to have an attribute (it may be a class attribute and usually is) named "isDocTemp", and this attribute must evaluate to true. Otherwise, your object is called with no parameters. The relevant code is: if hasattr(v,'isDocTemp') and v.isDocTemp: v=v(None, self) else: try: v=v() except (AttributeError,TypeError): pass (from DocumentTemplate/DT_Util.py:277) []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ 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] Namespace within a product... (argh...)
Well, beeing very straightforward, I read this, in OSFP/Help/DTMLDocument.py : """ A DTMLDocument implicitly pass itself as a client argument in addition to the specified client, so names are looked up in the DTMLDocument itself. Passing in a namespace to a DTML Document is often referred to as providing the Document with a *context*. DTML Documents are called three ways: From DTML -- A DTML Document can be called from another DTML Method or Document:: In this example, the Document 'aDTMLDocument' is being called from another DTML object by name. The calling method passes the value 'this' as the client argument and the current DTML names pace as the REQUEST argument. The above is identical to this following usage in a DTML Python expression:: From Python -- Products, External Methods, and PythonMethods can call a DTML Document in the same way as calling a DTML Document from a Python expression in DTML; as shown in the previous example. By the Publisher -- When the URL of a DTML Document is fetched from Zope, the DTML Document is called by the publisher. The REQUEST object is passes as the second argument to the Document. """ So - I had a look at DTMLDocument.py and saw the following method : def __call__ (self, client = None, REQUEST = {}, **kw): ... SO - I try to create this method for my product : def __call__ (self, client = None, REQUEST = {}, **kw): print client print REQUEST and it prints : None {} It seems that in fact the DTML document doesn't actually pass _.None and _ to my object. WHY ?? How can I enforce DTML Docs/Meths to pass it anyway ??? Many thanks, P.-J. -- If the only tool you have is a hammer, you tend to see every problem as a nail. Si le seul outil dont vous disposez est un marteau, vous avez tendance à voir chaque problème comme un clou. --Abraham Maslow ___ 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] Namespace problem with the dtml-sendmail and the smtphost
I have a dtml method in a zClass that looks like this: To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: This is a test A test!!! "theSMTPHost" is defined as a property in the zClass. But when i use the method I get a: Error Type: error Error Value: host not found If i write: It gets send without a hitch. and if I write it returns mail.tele.dk as expected. I then try this, which also fails. Mailhost: To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: This is a test A test!!! Is it not possible to set the smtphost to a string in a dtml variabel? Regards 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] Namespace problems...
Hi there, I've still got to build a bigger website. So I stored my headers and footers and many other things in root/pub. All the other documents are stored in root/Intra and below. I've got my standard_html_header, with which I can display user-defined titles which may also contain values of global properties. The user-defined title is being built in the document before the header is called, e. g. something like: In the standard_html_header method I'm checking whether there is a titel attribute or not. This works fine. But for general use I want to keep the possibility of displaying the title_or_id of the document when I don't introduce a user-defined title. This would be no problem if s_h_h wasn't situated in root/pub, so I have to call it within the . But doing this, pub is on the top of my namespace, so that calling title_or_id returns the title_or_id of the container of s_h_h, i. e. pub! How can I nevertheless access within the s_h_h to the title_or_id of my original document? Thanks. Lars ___ 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] namespace conflict question needs explanation
Jason Cunliffe Wrote: > Hello > > Please can someone help us understand how to avoid DTML method names > conflicting with other zope objects with same name. ... > 2. Below this my DTML file includes calls to this template like this: > > > > > > ... > It provokes me to ask simply what is the search path priority of object > acquistion in zope and how do you control it safely? This appears to be a classic aquisition gotcha. You can use the "only" option of the dtml-with tag to eliminate namespace conflicts. However, in this case I might suggest passing the parameters directly to objemedswf instead of using REQUEST. like so: This leaves no ambiguity about what is being called, where it is located and what is being passed to it. This creates more readable code IMHO. -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] namespace conflict question needs explanation
Hello Please can someone help us understand how to avoid DTML method names conflicting with other zope objects with same name. For example using Zope export/import during recent site development to transfer work from local machines to the linux server broke sections of our site in a manner which was very hard to find. The reason we have finally traced to namespace conflict. We imported code which included calls to a local zope object named 'swf' for simple substitution. But suddenly our code did not work. It turned out that another object identically named 'swf' was an already existing 'folder' ..!! This is a very disturbing discovery, becuase it implies that one might have anywhere at anytime hidden or visible namespace conflicts emerging and vanishing with no control. We had thought that would avoid this. But it does not and may even cause it! It also implies that makes development of Zope sites across various machines very hit-or-miss Please help.. Exact code dump follows... 1. I have an original DTML template called 'objembedswf' in a folder named 'Flash4' HEIGHT=> 2. Below this my DTML file includes calls to this template like this: 3. Here is the result of substitution returned in browser I draw you attention to the fact that was supposed to be subsituted with 'login.swf', but instead became ..ouch.. 4. The reason appears to be that there is a namespace conflict elsewhere in my Zope tree. As it turns out, we have a folder right under / called 'swf'. In fact it could be many places and still cause a conflict. This 'bug/feature' is the same under Zope 2.1.6, and Zope 2.2.0 in Win98se and LinuxRedhat. Is it something about or perhaps our use of which creates this unpredictable and confusing effect? Is this is a bug? As it stands it means is is very hard to have people working on separate sections of a Zope site because at any time they might be causing namespace collisions like this. In our case the effect was obvious - our swf files immedaitely woudl not display. But other voodoo could easily occur which migh not appear for some time. It provokes me to ask simply what is the search path priority of object acquistion in zope and how do you control it safely? Thank you - Jason Cunliffe ___ 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] computed attribute access(was: Re: [Zope] namespace and PARENTS doubt) (was: Re: [Zope] namespace and PARENTS doubt)
Fabio Akita writes: > For "computed attribute access", use "_.getattr". In your case probably (I am not sure, I understand you expression correctly): 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] namespace and PARENTS doubt
Untested: ...commands.. > -Original Message- > From: Fabio Akita [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 25, 2000 5:46 PM > To: [EMAIL PROTECTED] > Subject: [Zope] namespace and PARENTS doubt > > > Hi again > > That may be a simple doubt but that´s it: > > > > 'commands' > > > > The above statement just doesn´t work. The 'parameter' is a > DTML variable in > the global namespace. > > But if I try: > > > > > That will work. What I am trying to do is to execute the " > 'commands'." above for lot´s of 'parameter' folders. But the > _['PARENTS[1].' + 'something'] trick doesn´t work. Is there > another way to > make the first statement work? > > (maybe I was a bit confusing here, I hope you understand the problem) > > Regards > > > ___ > 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] namespace and PARENTS doubt
Hi again That may be a simple doubt but that´s it: 'commands' The above statement just doesn´t work. The 'parameter' is a DTML variable in the global namespace. But if I try: That will work. What I am trying to do is to execute the " 'commands'." above for lot´s of 'parameter' folders. But the _['PARENTS[1].' + 'something'] trick doesn´t work. Is there another way to make the first statement work? (maybe I was a bit confusing here, I hope you understand the problem) Regards ___ 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] namespace problem??
Hello, How can I get the contents of variable out of my code? For example: I need get the variable HORA and I couldn't. Thanks Marcus Mendes ___ 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] namespace ??
Hello, How can I get the contents of variable out of my code? For example: I need get the variable HORA and I couldn't. Thanks Marcus Mendes ___ 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] namespace problem?
How can I get the content of TITULO_CIDADE out of my tags ?? My code is : Thanks. Marcus Mendes ___ 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] namespace??
On Fri, Jul 14, 2000 at 11:31:34AM +0100, Marcus Mendes wrote: > How can I get the content of TITULO_CIDADE out of my tags > ?? > > My code is : > > > > > "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)"> > > > I, for one, don't quite understand your question Marcus. Could you be more specific? -- 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 )
[Zope] namespace??
How can I get the content of TITULO_CIDADE out of my tags ?? My code is : TITULO_CIDADE',_['sequence-item'].title)"> Thanks. Marcus Mendes
[Zope] namespace??
How can I get the content of TITULO_CIDADE out of my tags ?? My code is : Thanks. Marcus Mendes ___ 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] namespace???
Hello, How can I put the content of TITULO_CIDADE out of my tags ?? My code is : Thanks. Marcus Mendes ___ 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] Namespace question
Rogerio Atem de Carvalho writes: > folder1 > | > folder11 > | > folder111 > > I have some objects in folder111 which I want to pass > as parameters to a dtml method in folder1 (two levels > above). I tried something like: > > > qry_item='par1',qry_table='par2', list_name='par3')"> > > > > where par1 and par2 are strings and par3 is an object > in folder111. mtdCreate is in folder1. it doesn't > work... You do not pass the objects "par1", "par2" and "par3" but the literal strings 'par1', 'par2' and 'par3'. At least for "par3", this will not be what you want. Try: I.e., remove the quotes from "par3" (maybe the other "par", too). 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] Namespace question
Rogerio Atem de Carvalho wrote: > > Hi, > > I working on an structure like this: > > folder1 > | > folder11 > | > folder111 > > I have some objects in folder111 which I want to pass > as parameters to a dtml method in folder1 (two levels > above). I tried something like: > > > qry_item='par1',qry_table='par2', list_name='par3')"> > > > > where par1 and par2 are strings and par3 is an object > in folder111. mtdCreate is in folder1. it doesn't > work... > > How can I do that You should be able to do: -- Nick Garcia | [EMAIL PROTECTED] CodeIt Computing | http://codeit.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] Namespace question
Hi, I working on an structure like this: folder1 | folder11 | folder111 I have some objects in folder111 which I want to pass as parameters to a dtml method in folder1 (two levels above). I tried something like: where par1 and par2 are strings and par3 is an object in folder111. mtdCreate is in folder1. it doesn't work... How can I do that --- E-mail enviado pelo servidor do CEFETCampos ___ 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 )