In webpy can I pass a class into a template like a model ?  I have a 
class with many coordinate conversion functions for SVG and so I don't 
want to pass each function into the template as a global function - is 
there a way to pass in entire class ?

this didn't work but explains what I want to do
code.py
def view:
    list = .....
    print render.mainpage(list, conversions)

class conversions:
    def convert1(x0,x1)
        return x0/x1

mainpage.html
....
cx = " $conversions.convert1(list.x0,list.x1) "

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