Hi Renato,

On Sunday, June 1, 2014 4:36:55 PM UTC+2, Renato Oliveira wrote:
>
> On Sunday, June 1, 2014 3:26:06 AM UTC+2, Renato Oliveira wrote:
>>>
>>> I open sourced <https://github.com/labcodes/django-static-chooser> the 
>>> modification we did (4 or 5 lines plus tests), and was about to send it to 
>>> pypi and wondered if it is an improvement to do on Django itself.
>>>
>>
>> I don't think so, since Django already provides a way to do what you are 
>> after: You can write your on static storage backend which the static-tag 
>> will then use, this way the backend will figure out what to do when 
>> DEBUG=False/True.
>>
>
> Yeah, i'm aware of this, and sorry for not being explicit. The goal of 
> this improvement is to point to many places. For exampe, if I have a 
> project with, bootstrap, jquery and angular. I can do this:
>
> {% static 'path/to/my/angular.js' http://googlecdn/angular.js %}
> {% static 'path/to/bootstrap.css' http://bootstrapcdn/bootstrap.css %}
>

I don't see any difference to the  DEBUG example here, a storage backend 
can still return different URLs, depending on the filename (eg angular vs 
bootstrap). Your proposal seems to remove the choice from the user and puts 
it into the template. FWIW, in my experience per project CDNs often 
introduce greater latency and less performance than a single (or more) 
keep-alive connections to one server fetching all the files (possible 
concatenated).

Cheers,
Florian

>

-- 
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/d7da3542-f64e-4aed-83c0-4d56070d9d01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to