On Sep 6, 2006, at 2:33 AM, Timur Izhbulatov wrote:

> Sorry, but I still don't get your idea. I agree, I can pass the  
> schema from the
> controller to the template engine through expose using its mapping  
> argument. But
> how the validate decorator will receive it than?

Ahh. I think I might have missed something with your original  
thought. I thought the schema was known beforehand...

if that's not the case, the only way at present to dynamically  
provide a schema to validate is by passing a callable (eg a function)  
to the decorator, and it will call that at the time that it wants to  
do validation. (I know you can do this with the form, I'm not 100%  
sure you can do this with a schema...)

> I mean my controller method has to be decorated by validate at the  
> application
> startup but the schema it needs will be generated by the template  
> engine only
> after the turbogears.view.base.render() function is called.
>
> Looks like I'm missing something (this is my first TG experience).  
> Could you
> please post some code snippets for clarification?

Yeah, I was not envisioning the template engine creating the schema.  
I was envisioning that the template engine would use a schema that is  
passed in.

Kevin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to