On Friday 03 July 2009 17:51:33 Carl wrote:
> Hi,
> Can someone explain how beaker is used in TG2? I see in the Pylons
> docs that it can be used to persist values across calls via cookies.
>
> In my app it is inappropriate. I don't use it in my controller
> methods, but beaker still sets a cookie (beaker.session.id).
>
> Can I turn it off via configuration or some other way?

Not directly via config, no.

What you can do is to subclass AppConfig in 

myproject.config.app_cfg

and override the 


    def add_core_middleware(self, app):
        """Add support for routes dispatch, sessions, and caching."""
        app = RoutesMiddleware(app, config['routes.map'])
        app = SessionMiddleware(app, config)
        app = CacheMiddleware(app, config)
        return app

method with this:

    def add_core_middleware(self, app):
        """Add support for routes dispatch, sessions, and caching."""
        app = RoutesMiddleware(app, config['routes.map'])
        return app


This is untested - but it should rid you of beaker.

Diez

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