Such a function should be put into your code.py.
Then make it accessible to the templates like this:
def myfunc(lol):
pass
render = web.template.render('templates/', globals={'myfunc':myfunc})
Am 02.10.2011 15:41, schrieb Alex K:
> Suppose I have some functions in a template defined with "$def func_name".
> Can I
> call these functions from another template?
>
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/webpy/-/hLiDxn3Y5XkJ.
> 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.
--
http://noobz.cc/
http://digitalfolklore.org/
http://contemporary-home-computing.org/1tb/
--
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.