!TurboGears should configure this properly in a quickstarted app.
On the !TurboGears
[http://groups.google.com/group/turbogears/browse_thread/thread/514573c099e2158d
mailing list], Diez suggested adding the following to config.middleware:
{{{
import tw.api
tw.api.resources.registry.ACTIVE_VARIANT = app_conf.get(
"tw.resource_variant", tw.api.resources.registry.DEFAULT_VARIANT)
}}}
Then, the templates for development.ini and deployment.ini should set
`tw.resource_variant` to 'debug' and 'minified'/'packed' respectively.
Diez also suggested passing `app_conf` (`self`) to
`tw.api.make_middleware` (`tw_middleware`) in the
`AppConfig.add_tosca_middleware()` method of the `tg.configuration`
module. Then !ToscaWidgets could care for the configuration itself, and
other config-options could be set as well, e.g. `require_once`,
`serve_resources` and so on.
--
Ticket URL: <http://trac.turbogears.org/ticket/2439>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
* milestone: 2.1 => 2.1b2
--
Ticket URL: <http://trac.turbogears.org/ticket/2439#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
I added this as a config option in the "toscawidgets" section. This way
you can even set it in your .ini file.
toscawidgets.framework.resource_variant = min in your ini to set to
minified files, for instance.
--
Ticket URL: <http://trac.turbogears.org/ticket/2439#comment:2>