On 9/1/07, mickolka <[EMAIL PROTECTED]> wrote:
>
>
> Hi all
> I want to write a FileStorage service object with following features
> - should be configured on the start of the application
> - should be accessible from the any controller
> - have only one instance
Pylons provide a `g` namespace for your application "globals":
class Globals(object):
def __init__(self):
self.fs = MySuperService()
... controller.html:
<% g.fs.supermethod() %>
Check the docs or search through Pylons cookbook, there is probably a recipe
for this.
Max.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---