You can define functions in python side and then make them global reachable.

*in code.py*
def function_will_be_used_in_html():
    bla bla

web.template.Template.globals['function_will_be_used_in_html']
= function_will_be_used_in_html

*in .html*
$function_will_be_used_in_html()



2011/9/8 michael kapelko <[email protected]>

> Hi.
> I've defined several auxiliary functions in one of my html files
> (building GET parameters, etc). I want to keep it in one place and
> reuse for all html files. Is it possible?
> thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" 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/webpy?hl=en.
>
>


-- 
Aydın Şen

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to