this is a sample:

# cody.py
web.template.Template.globals['make_html'] = make_html

# template.html
$:make_html(entry.excerpt)

On 10/15/07, slav0nic <[EMAIL PROTECTED]> wrote:
>
>
> hi, as use global functions in templates?
>
> for example i need use xrange() in template
>
> some of this:
> $for i in xrange(j):
> ....
>
> $:xrage(j) show list, but as use it in loop?
>
>
> >
>


-- 
每个人都有一片属于自己的森林, 迷失的人迷失了, 相逢的还会再相逢...
Gtalk: iexper(at)gmail.com

--~--~---------~--~----~------------~-------~--~----~
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