On Tue, Feb 14, 2012 at 09:54:52AM -0800, Jonathan Vanasco wrote:
> this looks pretty neat.
Thanks!
> there are a few things I'm confused by.
>
> Exactly how is the switch handled on templates ?
The templates use the familiar request.static_url function. No change
there.
> What configuration
> is needed on the app ?
Yes, this needs to change, you need to use the
van.static.cdn.config_static function. There's an example in the README
under: "Implementing in your application".
Basically, passing the cdn_url parameter to config static allows you to
control if the CDN is used or not.
> The approaches I've seen are either:
> 1- Some sort of post-processesing regex
> 2- Prepending static files with a cdn call. i.e. <img src=${cdn}/path/
> to/img.jpg" />
I did this precisely so that I didn't have to do anything special in the
templates. You just need to follow the pyramid documentation and use
request.static_url in your templates.
> The S3 confuses me too...
> """If you use a url like this s3://mybucket/path/to/files/ the
> extracted resources will be placed directly in Amazon S3."""
> How do you configure the s3 credentials ?
> - env vars
> - an app config file
> - a user/machine boto config file ?
Personally, I setup an /etc/boto.cfg file on the server for a limited
permission access token. But that's just one way of skinning this cat
that's working for me in my setup.
You could also use a user-specific config file, environment variables or
pass the credentials on the command line.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
--
Brian Sutherland
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.