On Wed, Apr 16, 2008 at 7:34 AM, MilesTogoe <[EMAIL PROTECTED]> wrote:
>
>  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 ?

Yes.
May be you want to pass them as globals so that you don't have to pass
that with every template call.

    web.template.Template.globals['conversions'] = conversions

Are you sure you want to pass the class and not the object?

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