Re: [Zope] how to do this?

2007-03-15 Thread Andreas Jung
--On 15. März 2007 11:19:17 +0100 javi lopez <[EMAIL PROTECTED]> wrote: Hello everyone and thaks for your help: I have this things: Zdatabase Conection zsql method Controller page template(form) Controller python script(call zsql method) controller validator page template it´s a form, it sto

[Zope] how to do this?

2007-03-15 Thread javi lopez
Hello everyone and thaks for your help: I have this things: Zdatabase Conection zsql method Controller page template(form) Controller python script(call zsql method) controller validator page template it´s a form, it stores email and comments in database and it works. I need put all this inside

Re: [Zope] How to do...

2006-10-21 Thread Garito
Dieter Maurer escribió: Garito wrote at 2006-10-20 14:20 +0200: Dieter Maurer escribió: You remember I have warned you: "__getattr__" is difficult and error prone! Even me, I have spend hours to understand why I get occasional "__getattr__" infinite loops... And I know, in pri

Re: [Zope] How to do...

2006-10-20 Thread Dieter Maurer
Garito wrote at 2006-10-20 14:20 +0200: >Dieter Maurer escribió: >> You remember I have warned you: "__getattr__" is difficult and error prone! >> >>Even me, I have spend hours to understand why I get occasional >>"__getattr__" infinite loops... >>And I know, in principle, all the poten

Re: [Zope] How to do...

2006-10-20 Thread Garito
Andreas Jung escribió: --On 20. Oktober 2006 15:08:26 +0200 Garito <[EMAIL PROTECTED]> wrote: If you thing __getattr__ will be the solutions perhaps I could try it but if you point me to avoid the recursive problems I could do the job Can you point me to a product or a paper to understand

Re: [Zope] How to do...

2006-10-20 Thread Andreas Jung
--On 20. Oktober 2006 15:08:26 +0200 Garito <[EMAIL PROTECTED]> wrote: If you thing __getattr__ will be the solutions perhaps I could try it but if you point me to avoid the recursive problems I could do the job Can you point me to a product or a paper to understand the __getattr__ problems?

Re: [Zope] How to do...

2006-10-20 Thread Garito
Andreas Jung escribió: --On 20. Oktober 2006 14:41:58 +0200 Garito <[EMAIL PROTECTED]> wrote: -aj Sorry but you don't know the whole project No project can be as scary as your requirements of your original posting :-) If there are a test to do I'll do it because I need to evaluate if Z

Re: [Zope] How to do...

2006-10-20 Thread Andreas Jung
--On 20. Oktober 2006 14:41:58 +0200 Garito <[EMAIL PROTECTED]> wrote: -aj Sorry but you don't know the whole project No project can be as scary as your requirements of your original posting :-) If there are a test to do I'll do it because I need to evaluate if Zope is my solution or not

Re: [Zope] How to do...

2006-10-20 Thread Garito
Andreas Jung escribió: --On 20. Oktober 2006 14:20:51 +0200 Garito <[EMAIL PROTECTED]> wrote: And I know, in principle, all the potential caveats... Can you point me to some example/product to try to avoid this kind of errors? You got already multiple useful advices how to proceed.

Re: [Zope] How to do...

2006-10-20 Thread Andreas Jung
--On 20. Oktober 2006 14:20:51 +0200 Garito <[EMAIL PROTECTED]> wrote: And I know, in principle, all the potential caveats... Can you point me to some example/product to try to avoid this kind of errors? You got already multiple useful advices how to proceed. Take one! Follow the roa

Re: [Zope] How to do...

2006-10-20 Thread Garito
Dieter Maurer escribió: Garito wrote at 2006-10-18 20:27 +0200: How can I create an accessor to read (not to write) and preprocess all properties? If you are only willing to write a single method that should do for all properties, then you will need to use "__getattr__". You re

Re: [Zope] How to do...

2006-10-20 Thread Chris Withers
Garito wrote: Sure, but I don't need only localization, I need to preprocess the properties before read them I'm afraid your entire approach is likely to end you in a world of pain... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

Re: [Zope] How to do...

2006-10-19 Thread Dieter Maurer
Garito wrote at 2006-10-18 20:27 +0200: > >How can I create an accessor to read (not to write) and preprocess all >properties? If you are only willing to write a single method that should do for all properties, then you will need to use "__getattr__". You remember I have warned you: "__get

Re: [Zope] How to do...

2006-10-19 Thread Jonathan
- Original Message - From: "Garito" <[EMAIL PROTECTED]> To: "Chris Withers" <[EMAIL PROTECTED]> Cc: "Lista Zope Internacional" Sent: Thursday, October 19, 2006 8:46 AM Subject: Re: [Zope] How to do... Chris Withers escribió: Garito wrot

Re: [Zope] How to do...

2006-10-19 Thread Garito
Chris Withers escribió: Garito wrote: object.Property2 and retrieve the data with the current locale For spanish locale I would like to retrieve 18-10-2006 Rather than torturing yourself with all this weirdness, maybe you should look at using Zope 3's locale support in your app, whether it's

Re: [Zope] How to do...

2006-10-19 Thread Chris Withers
Garito wrote: object.Property2 and retrieve the data with the current locale For spanish locale I would like to retrieve 18-10-2006 Rather than torturing yourself with all this weirdness, maybe you should look at using Zope 3's locale support in your app, whether it's zope 2 or zope 3... c

Re: [Zope] How to do...

2006-10-18 Thread Garito
Dieter Maurer escribió: Garito wrote at 2006-10-18 16:15 +0200: ... How can I control the way an attribute of a product is readed? __getattr__? __getattribute__? A "product" is an extension mechanism for Zope. Usually, a "product" does not have attributes (you are interested in). But

Re: [Zope] How to do...

2006-10-18 Thread Dieter Maurer
Garito wrote at 2006-10-18 16:15 +0200: > ... >How can I control the way an attribute of a product is readed? >__getattr__? __getattribute__? A "product" is an extension mechanism for Zope. Usually, a "product" does not have attributes (you are interested in). But inside your product you may hav

Re: [Zope] How to do...

2006-10-18 Thread Garito
Andreas Jung escribió: --On 18. Oktober 2006 19:41:07 +0200 Garito <[EMAIL PROTECTED]> wrote: You got already multiple advices. Write a method "anotherproperty()" and do whatever you like with in this method. You can call it from TALES as here/anotherproperty. TALES bascially deals with att

Re: [Zope] How to do...

2006-10-18 Thread Andreas Jung
--On 18. Oktober 2006 19:41:07 +0200 Garito <[EMAIL PROTECTED]> wrote: You got already multiple advices. Write a method "anotherproperty()" and do whatever you like with in this method. You can call it from TALES as here/anotherproperty. TALES bascially deals with attributes and methods in the

Re: [Zope] How to do...

2006-10-18 Thread Garito
Andreas Jung escribió: --On 18. Oktober 2006 19:17:42 +0200 Garito <[EMAIL PROTECTED]> wrote: I only try to create a model but I'm searching the best way to create it I try to create properties "like" this is (in the last example): object.property "is like" object.anotherproperty You go

Re: [Zope] How to do...

2006-10-18 Thread Andreas Jung
--On 18. Oktober 2006 19:17:42 +0200 Garito <[EMAIL PROTECTED]> wrote: I only try to create a model but I'm searching the best way to create it I try to create properties "like" this is (in the last example): object.property "is like" object.anotherproperty You got already multiple advic

Re: [Zope] How to do...

2006-10-18 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18 Oct 2006, at 12:53, Garito wrote: Then I can't create a property that stores a tal expression for example? I would like to write things like: object.property = 'here/anotherproperty' object.anotherproperty = 'Barcelona' and ask it like:

Re: [Zope] How to do...

2006-10-18 Thread Garito
Andreas Jung escribió: --On 18. Oktober 2006 18:53:05 +0200 Garito <[EMAIL PROTECTED]> wrote: Andreas Jung escribió: --On 18. Oktober 2006 16:15:37 +0200 Garito <[EMAIL PROTECTED]> wrote: Hi all! How can I control the way an attribute of a product is readed? __getattr__? __getattribute_

Re: [Zope] How to do...

2006-10-18 Thread Andreas Jung
--On 18. Oktober 2006 18:53:05 +0200 Garito <[EMAIL PROTECTED]> wrote: Andreas Jung escribió: --On 18. Oktober 2006 16:15:37 +0200 Garito <[EMAIL PROTECTED]> wrote: Hi all! How can I control the way an attribute of a product is readed? __getattr__? __getattribute__? I try the __getattri

Re: [Zope] How to do...

2006-10-18 Thread Garito
Andreas Jung escribió: --On 18. Oktober 2006 16:15:37 +0200 Garito <[EMAIL PROTECTED]> wrote: Hi all! How can I control the way an attribute of a product is readed? __getattr__? __getattribute__? I try the __getattribute__ way but it modifies the property pages Example: I create an object

Re: [Zope] How to do...

2006-10-18 Thread Jonathan
- Original Message - From: "Garito" <[EMAIL PROTECTED]> To: "Lista Zope Internacional" Sent: Wednesday, October 18, 2006 10:15 AM Subject: [Zope] How to do... Hi all! How can I control the way an attribute of a product is readed? __getattr__? __g

Re: [Zope] How to do...

2006-10-18 Thread Andreas Jung
--On 18. Oktober 2006 16:15:37 +0200 Garito <[EMAIL PROTECTED]> wrote: Hi all! How can I control the way an attribute of a product is readed? __getattr__? __getattribute__? I try the __getattribute__ way but it modifies the property pages Example: I create an object instance of the product

[Zope] How to do...

2006-10-18 Thread Garito
Hi all! How can I control the way an attribute of a product is readed? __getattr__? __getattribute__? I try the __getattribute__ way but it modifies the property pages Example: I create an object instance of the product and like: Property1 = 'Some text' Property2 = 2006-10-18 I would like

Re: [Zope] How to do this trick..

2006-03-28 Thread Chris Withers
Hi Jason, I see a few people have had a stab at this, but I have a feeling I know what you really meant ;-) Jason C. Leach wrote: I'm wondering how I can do this little trick (sp_info is a globaly devide var, it's a dictionary obj): So based on my the value of 'gro

Re: [Zope] How to do this trick..

2006-03-27 Thread David H
Jason C. Leach wrote: Hi, I'm wondering how I can do this little trick (sp_info is a globaly devide var, it's a dictionary obj): tal:attributes="onmouseover string:doTooltip(event, '${sp_info/${group}/common_name}')" onmouseout="hideTi

Re: [Zope] How to do this trick..

2006-03-27 Thread J Cameron Cooper
Jason C. Leach wrote: I'm wondering how I can do this little trick (sp_info is a globaly devide var, it's a dictionary obj): tal:attributes="onmouseover string:doTooltip(event, '${sp_info/${group}/common_name}')" onmouseout="hideTip()">

Re: [Zope] How to do this trick..

2006-03-27 Thread Ross Patterson
The tags are to make sure the order of TAL operations works properly with the tal:define being done *after* the tal:repeat. Hope this helps. Ross ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross p

[Zope] How to do this trick..

2006-03-27 Thread Jason C. Leach
Hi,I'm wondering how I can do this little trick (sp_info is a globaly devide var, it's a dictionary obj):        tal:content="group"     tal:attributes="onmouseover string:doTooltip(event, '${sp_info/${group}/common_name}')"     >