Hi,

>that is generally a bad idea, you are mixing presentation logic with
>bussiness logic, why can't you just define the function and pass it's
>results as a variable? is x something defined in runtime inside the
>template? do you have access to X before if so then the first approach
>I suggested is the way to go, if not please post an example of what
>your actually trying to do.
>  
>
Ah, interesting comment.

What myfunc does is run textile (simple markup to html) on the input, 
plus a few of my own tweaks. I am then using it on some fields that are 
being displayed in the widget, something like:

<td>$value.a</td><td>${mytextile(value.b)}</td>

The value is an SQLAlchemy object, so I don't want to update the values 
(as that would get saved in the database) and I'd like to avoid creating 
a copy of the object. So, doing the calls at this point seems sensible.

I guess this is something of a special case.

Paul

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to