#2439: Support ToscaWidgets resource variants and other TW config options
------------------------+---------------------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: TurboGears | Version: trunk
Severity: normal | Keywords: ToscaWidgets variants
------------------------+---------------------------------------------------
!ToscaWidgets 0.9.8 supports "variants" for Javascript and CSS resources
(minified, packed or debug versions of the js/css files).
!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
--
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en