[EMAIL PROTECTED] ha scritto:
> That's an interesting suggestion.  I'm not a CherryPy expert, so how
> do I bind something to a request like that?
>   

This way:

>>> def get_flash_service():
>>>     try:
>>>         ret = cherrypy.request.flash_service
>>>     except AttributeError:
>>>         ret = cherrypy.request.flash_service = Flash()
>>>     return ret
>>>       
>>> def info(*args, **kw):
>>>     get_flash_service().info(*args, **kw)
>>>       

I use this method to attach any kind of object to the request (even 
short-lived db or ldap connections)

I've already switched to your class and it's cute :)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to