On 01-06-14 16:36, Renato Oliveira wrote:

{% static 'path/to/my/angular.js' http://googlecdn/angular.js %}
{% static 'path/to/bootstrap.css' http://bootstrapcdn/bootstrap.css %}

It seems to me that the core use case of the staticfiles app is to manage *local* css files well. This includes the scenario where the local files are copied off to a CDN. That CDN's base URL can then be used in production.


What you are proposing sounds to be a different problem:

- You want to use a CDN in production.

- You want to use local files as a fallback for when you're on a train without an internet connection to the CDN.


So... I don't think this change should go into staticfiles.

But... the basic use case is sound. Perhaps you could change your code into a template tag that looks like
{% cdn http://googlecdn/whatever.js %} ?

With a management command that would download all the relevant files to a local directory? (Assuming you can list the templates). Or that would do it on the fly when an internet connection is available when you use the template?

It works the other way around from your current approach, but that looks to me to be the right way around :-)



Reinout

--
Reinout van Rees                    http://reinout.vanrees.org/
rein...@vanrees.org             http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/lmg7nt%24og3%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to