Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Pyramid - Including diffrent version of static files in development and production mode
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
 
psychowico  
View profile  
 More options Jul 21 2012, 4:29 pm
From: psychowico <psychow...@projectksi.com>
Date: Sat, 21 Jul 2012 13:29:02 -0700 (PDT)
Local: Sat, Jul 21 2012 4:29 pm
Subject: Pyramid - Including diffrent version of static files in development and production mode

Hi all.
 I am quite new in Pyramid and still learning. Now I looking for best way
to manage static resources in project. I found nice package "Fanstatic<http://www.fanstatic.org/en/latest/index.html>"
and "pyramid_fanstatic <http://pypi.python.org/pypi/pyramid_fanstatic/>"
plugin, but it looks that this not working with pyramid 1.3 and Python 3.2.
Main things that I want achieve is automatically replace develop libraries
version in develop mode by packed in production - *jquery.js* and *jquery.min.js
*for example.
I see some ways to manage this, but I looking for elegant way, I guess this
task is popular and some good way exists to do this.


 
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.
Chris McDonough  
View profile  
 More options Jul 21 2012, 5:36 pm
From: Chris McDonough <chr...@plope.com>
Date: Sat, 21 Jul 2012 17:36:21 -0400
Local: Sat, Jul 21 2012 5:36 pm
Subject: Re: Pyramid - Including diffrent version of static files in development and production mode
On 07/21/2012 04:29 PM, psychowico wrote:

> Hi all.
>   I am quite new in Pyramid and still learning. Now I looking for best
> way to manage static resources in project. I found nice package
> "Fanstatic <http://www.fanstatic.org/en/latest/index.html>" and
> "pyramid_fanstatic <http://pypi.python.org/pypi/pyramid_fanstatic/>"
> plugin, but it looks that this not working with pyramid 1.3 and Python 3.2.
> Main things that I want achieve is automatically replace develop
> libraries version in develop mode by packed in production - /jquery.js/
> and /jquery.min.js /for example.
> I see some ways to manage this, but I looking for elegant way, I guess
> this task is popular and some good way exists to do this.

If you've used a scaffold to set up your Pyramid application.  You know
where you do:

config.add_static_view(..)

to add a static view?

That's python of course.  Conditionalize it with an "if".  Add a
different static directory based on a value passed in to "settings" in
your main().

- C


 
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.
Jonathan Vanasco  
View profile  
 More options Jul 21 2012, 5:58 pm
From: Jonathan Vanasco <jonat...@findmeon.com>
Date: Sat, 21 Jul 2012 14:58:06 -0700 (PDT)
Local: Sat, Jul 21 2012 5:58 pm
Subject: Re: Pyramid - Including diffrent version of static files in development and production mode
i have a deploy script written in Fabric ( fabfile )

it handles a bunch of things like:

- minify js and css
- create symlinks for directories as needed
- etc

generally i do one - or both - of the following:
1) instead of static, i have /-static-source /static-production
2) a symlink in 'develop' mode links /static to /-static-source ; in
'production' mode, it works on 'source' files and exports them to
'production' - which is them symlinked to static
3) i also set a 'is_production' flag on the request object, and alter
templates like that

I opted for a flag and template logic, because on production systems I
want to concatenate as many of the CSS and JS files as possible to
minimize server requests.  switching between a.js and a.min.js is a
step in the right direction, but i want my production to have a+b+c+d+e
+f.min.js

that being said == it's very rare that you should ever need to use a
non-minified version of jquery or most plugins.  the production
versions have all the same debug capabilities, the non-minified
versions are really there for people to hack on the core.


 
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.
Nando Florestan  
View profile  
 More options Jul 22 2012, 5:16 am
From: Nando Florestan <nandoflores...@gmail.com>
Date: Sun, 22 Jul 2012 02:16:05 -0700 (PDT)
Local: Sun, Jul 22 2012 5:16 am
Subject: Re: Pyramid - Including diffrent version of static files in development and production mode

http://code.google.com/p/bag/source/browse/bag/web/web_deps.py

Em sábado, 21 de julho de 2012 17h29min02s UTC-3, psychowico escreveu:


 
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.
psychowico  
View profile  
 More options Jul 23 2012, 4:18 am
From: psychowico <psychow...@projectksi.com>
Date: Mon, 23 Jul 2012 01:18:47 -0700 (PDT)
Local: Mon, Jul 23 2012 4:18 am
Subject: Re: Pyramid - Including diffrent version of static files in development and production mode

Thanks for all you advices. WebDeps looking very promising, I will look at
it.


 
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 »