On Jan 12, 2008 12:18 AM, huntercross <[EMAIL PROTECTED]> wrote:
> i searched the documentation and the group, but couldn't find an
> answer. hopefully it is an easy one.
> i want to implement a function called nice_telephone() in my templates
> that formats
> telephone numbers pulled from the database.
>
> here is my code.py...
>
> render = web.template.render('/removed/httpd/htdocs/templates/',
> cache=False)
> web.template.Template.globals['nice_telephone'] = nice_telephone

I could be wrong on this but I am pretty sure templates don't support
functions.  They are pretty simple at this point.

Why not, after your call to your database, mangle the data and then
send it to the templates?

-- 
# Curt Micol
"Today is the tomorrow I was so worried about yesterday." -Anthony Hopkins

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