Anand Chitipothu wrote: > 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? > thks. But I think I'm going to switch to using SQLObject which gives me the model classes where I can have these kind of functions. I actually think a light ORM will be a benefit to our webpy app especially in a complex application (we have about 50+ tables)
> > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
