[TurboGears] #2439: Support ToscaWidgets resource variants and other TW config options

0 views
Skip to first unread message

TurboGears

unread,
Jan 7, 2010, 5:21:52 PM1/7/10
to turbogear...@googlegroups.com
#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

TurboGears

unread,
Jan 26, 2010, 9:24:29 PM1/26/10
to turbogear...@googlegroups.com
#2439: Support ToscaWidgets resource variants and other TW config options
-----------------------------------+----------------------------------------

Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.1b2
Component: TurboGears | Version: trunk
Severity: normal | Resolution:
Keywords: ToscaWidgets variants |
-----------------------------------+----------------------------------------
Changes (by percious):

* milestone: 2.1 => 2.1b2

--
Ticket URL: <http://trac.turbogears.org/ticket/2439#comment:1>

TurboGears

unread,
Feb 24, 2010, 3:36:57 PM2/24/10
to turbogear...@googlegroups.com
#2439: Support ToscaWidgets resource variants and other TW config options
-----------------------------------+----------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: closed
Priority: high | Milestone: 2.1b2
Component: TurboGears | Version: trunk
Severity: normal | Resolution: fixed
Keywords: ToscaWidgets variants |
-----------------------------------+----------------------------------------
Changes (by percious):

* 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>

Reply all
Reply to author
Forward
0 new messages