On Jan 12, 2008 12:42 AM, ashok raavi <[EMAIL PROTECTED]> wrote:
> On 1/12/08, 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
> >
> >
> > then the the function is below that a ways...
>
> rearrange your code.
>
> move the function definition to be above the template globals.
>
> looks like this is the only problem.

Not sure what I was thinking, makes perfect sense.  Sorry for the
misinformation.

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