OK, I found this file, but I have no idea what to put there. what is wrap_app? A callable? A function? What parameters is it passed? Just the request? What does it return? I have no idea what contract the middleware is expected to fulfill.
Seriously, without an example or a detailed explanation, I'm never going to figure this out. There is zero documentation on this either. On Jan 11, 2010, at 2:56 AM, Diez B. Roggisch wrote: > 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. > >
-- 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.

