On Dec 13, 2007 6:00 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Aha, thank you, Ches. It's similar to what I want but the problem is > that the quantity of different static_files paths I need is thousands, > so with this mean I have to generate thousands of apps, yep? > Seems to me that what you need to do is to make a custom middleware, which is probably a subclass of the existing static-files publisher. Based on the request/environ at that point, the app in the stack could select which static directory to inspect and add to the cascade. Another option (since we're not supposed to make much middleware) would be to make your own controller that you hook up to the static file server in Paste. Then, use the routes map to connect the "dynamic static" part of your URL to that controller. So, the path "/static/image.banner.gif" requested from the browser would be intercepted by routes, dispatched to your new controller, which could really serve something like "/tree/2007/12/20/blue/image.banner.gif" depending on user, request, time of day, whatever you want. I keep having to constantly remind myself as I work with Pylons that URL-space need not have any correlation to what is actually sent; it's just strings moving around. My old tools (Webware) still had the 1URL==1File mentality, and of course static html does too. Good luck. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
