On Monday 11 January 2010 07:01:44 Todd Blanchard wrote:
> The documentation hints at user defined middleware but fails to provide an
> example.  I have an app that serves multiple sites, so I have a sites table
> in the database with one for each expected domain.  Each site has a list of
> site_settings that has things like the google_api_key for that domain along
> with color options and such.  I'd like the middleware to fetch that stuff
> and stick it into the session on each request.  I have no idea what that
> would look like to implement.

In <yourproject>.config.middleware is a call to make_base_app. This can take 
an additional parameter, wrap_app, which will be run right before diving into 
the pylons/TG2-stack.

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