On Wednesday 09 July 2008 17:50:43 Mark Ramm wrote:
> We're using the cascade app from paste:
>
> http://pythonpaste.org/modules/cascade.html
>
> Along with the paste StaticURLParser and StaticJavascripts (from pylons)
>
> It's configured like this.
>
> So configuring this should be as simple as setting up the proper info
> in the ini file.
>
> javascripts_app = StaticJavascripts()
> static_app =
> StaticURLParser(config['pylons.paths']['static_files']) app =
> Cascade([static_app, javascripts_app, app])
>
> Let me know if we need to expose some more configuration information
> to the user app, all of this was changed sort-of-recently when we
> cleaned up middleware.py.
Ahh! That's interesting - and explains some stuff I've seen while
source-level-debugging. The Cascade is interersting for me...
And of course the current implementation is a bit warty::
# Static files (If running in production, and Apache or another web
# server is handling this static content, remove the following 3
lines)
javascripts_app = StaticJavascripts()
static_app = StaticURLParser(config['pylons.paths']['static_files'])
app = Cascade([static_app, javascripts_app, app])
return app
Obviously we want that configurable.
I will open a ticket & try and install TG2 from SVN, so that I can propose a
solution for this. I guess the best solution would be to have the above code
in <myapplication>/controllers/__init__.py or some such location - or the
config/middleware.py, that might even be better.
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---