Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Configuring ToscaWidget resource variants
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christoph Zwerschke  
View profile  
 More options Jan 4 2010, 5:47 am
From: Christoph Zwerschke <c...@online.de>
Date: Mon, 04 Jan 2010 11:47:43 +0100
Local: Mon, Jan 4 2010 5:47 am
Subject: Configuring ToscaWidget resource variants
ToscaWidgets 0.9.8 supports "variants" for Javascript and CSS resources
(minified, packed or debug versions of the js/css files).

Does anybody know how to configure the default variant in TurboGears?
I'd like to have the debug variant in my development environment, and
the packed variant in my production environment.

-- Christoph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diez B. Roggisch  
View profile  
 More options Jan 4 2010, 2:56 pm
From: "Diez B. Roggisch" <de...@web.de>
Date: Mon, 04 Jan 2010 20:56:32 +0100
Local: Mon, Jan 4 2010 2:56 pm
Subject: Re: [TurboGears] Configuring ToscaWidget resource variants
Christoph Zwerschke schrieb:

> ToscaWidgets 0.9.8 supports "variants" for Javascript and CSS resources
> (minified, packed or debug versions of the js/css files).

> Does anybody know how to configure the default variant in TurboGears?
> I'd like to have the debug variant in my development environment, and
> the packed variant in my production environment.

There is no config-file-way for now, partially because TW lacks an
option in the make_middleware-call, partially because TG2 doesn't
propagate configuration settings in the AppConfig-class.

So IMHO the easiest way is to set this value inside config.middleware
like this:

import tw.api

tw.api.resources.registry.ACTIVE_VARIANT =
app_conf.get("tw.resource_variant",
tw.api.resource.registry.DEFAULT_VARIANT)

Regards,

Diez


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoph Zwerschke  
View profile  
 More options Jan 5 2010, 7:36 am
From: Christoph Zwerschke <c...@online.de>
Date: Tue, 05 Jan 2010 13:36:38 +0100
Local: Tues, Jan 5 2010 7:36 am
Subject: Re: [TurboGears] Configuring ToscaWidget resource variants
Am 04.01.2010 20:56, schrieb Diez B. Roggisch:

> Christoph Zwerschke schrieb:
> There is no config-file-way for now, partially because TW lacks an
> option in the make_middleware-call, partially because TG2 doesn't
> propagate configuration settings in the AppConfig-class.

> So IMHO the easiest way is to set this value inside config.middleware
> like this:

> import tw.api

> tw.api.resources.registry.ACTIVE_VARIANT =
> app_conf.get("tw.resource_variant",
> tw.api.resource.registry.DEFAULT_VARIANT)

Thanks Diez, that works. I wonder whether we should add this to the
default quickstart template, together with appropriate settings of
tw.resource_variant in development.ini and depolyment.ini?

-- Christoph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diez B. Roggisch  
View profile  
 More options Jan 5 2010, 8:37 am
From: "Diez B. Roggisch" <de...@web.de>
Date: Tue, 5 Jan 2010 14:37:38 +0100
Local: Tues, Jan 5 2010 8:37 am
Subject: Re: [TurboGears] Configuring ToscaWidget resource variants
On Tuesday 05 January 2010 13:36:38 Christoph Zwerschke wrote:

Most certainly yes. I also would like to see that AppConf actually passes down
app_conf to the tw.api.make_middleware-call. Thus other config-options could
be set, e.g. require_once, serve_resources and so on.

Diez


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoph Zwerschke  
View profile  
 More options Jan 7 2010, 5:23 pm
From: Christoph Zwerschke <c...@online.de>
Date: Thu, 07 Jan 2010 23:23:39 +0100
Local: Thurs, Jan 7 2010 5:23 pm
Subject: Re: [TurboGears] Configuring ToscaWidget resource variants
Am 05.01.2010 14:37 schrieb Diez B. Roggisch:

> Most certainly yes. I also would like to see that AppConf actually passes down
> app_conf to the tw.api.make_middleware-call. Thus other config-options could
> be set, e.g. require_once, serve_resources and so on.

Good idea. I've created ticket #2439 for this now.

-- Christoph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »