Another idea I accidentally came up with is to put utility methods in the base view class, which you can call as 'view.foo()'. It's neater than making an API object in BeforeRender, and it also allows views to call the exact same code if they need to sometimes.
On Thu, Jan 17, 2013 at 4:37 PM, Jonathan Vanasco <[email protected]> wrote: > i was going crazy trying to figure out how to standardize a cache priming > function for my templates. this should do the trick. > > thank you! > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/pylons-discuss/-/jNu60L0WPVAJ. > 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/pylons-discuss?hl=en. -- Mike Orr <[email protected]> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
